perf(income statement): cache income statement queries #2371
Reference in New Issue
Block a user
Delete Branch "zachgoll/perf-budget-category"
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?
This PR is a temporary fix for the slow income statement queries that are causing huge slowdowns on the budget and transaction pages.
Before (both warm + cold perform poorly):
After (cold query still inefficient, but subsequent runs significantly faster):
This PR does not address the core issue of the inefficient query. We will push a future fix to address that.
Bug: IncomeStatement Sync Fails Due to Private Method Access
The code attempts to call the private methods
family_statsandcategory_statson anIncomeStatementinstance. This external call to private methods will raise aNoMethodError, causing the intended cache warming to fail during the sync process.app/models/account/syncer.rb#L19-L228cafbc7f83/app/models/account/syncer.rb (L19-L22)Fix in Cursor
Bug: API Method Visibility Change
The
generate_multi_currency_data!method is no longer publicly accessible. Previously defined in the private section and exposed via aDemo::Generator.class_evalblock, it was removed during refactoring. Unlike other methods that were moved to the public section,generate_multi_currency_data!was not, and itsclass_evalexposure was also removed, breaking the public API.app/models/demo/generator.rb#L109-L12238cafbc7f83/app/models/demo/generator.rb (L109-L1223)Fix in Cursor
Was this report helpful? Give feedback by reacting with 👍 or 👎
✅ BugBot reviewed your changes and found no bugs!
Was this report helpful? Give feedback by reacting with 👍 or 👎