isRamseyMode() called twice per snowball projection request #58
Labels
No Label
architecture
backend
bug
feature
frontend
priority:critical
priority:high
priority:low
priority:medium
priority:nice-to-have
ux
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/BillTracker#58
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: MEH ⚪
Affected Files
routes/snowball.js—getDebtBills()and projection handlerProblem
isRamseyMode()hits SQLite on every call with no caching:Two reads per request for the same setting value that doesn't change within a single request.
Impact
Fix
Call
isRamseyMode()once at the top of the request handler and pass the result through:Or add a simple request-scoped cache.
Acceptance Criteria
isRamseyMode()is called at most once per requestFixed in
e41f413.getDebtBillsnow accepts an explicitramseyModeparam, eliminating the redundant DB call.