Problem
When editing an expense (merchant, amount, description, etc.), the reportAttributes Onyx-derived value could recompute all reports in the collection (e.g. ~15k) instead of only the affected report(s).
dataToIterate starts as Object.keys(reports) (full set). On the incremental path it was only narrowed when updates.length > 0 (report / metadata / actions / nameValuePairs changes). When only a transaction update fired, updates stayed empty while transactionsUpdates was set — the incremental branch ran but dataToIterate was never scoped down, so transaction report IDs were merged into the full list and every report was recomputed.
Expected outcome
In the incremental update path, only reports that actually need recomputation should be processed (e.g. reset dataToIterate when entering that branch so transaction-driven updates do not retain the full key set).
Impact
On a high–report-count account, fixing this avoided unnecessary work; author measured ~800ms improvement when updating an expense on iOS (~15k reports).
Implementation
Merged in: #87747
Related
- PR: #87747 — Fix
reportAttributes recomputing all reports on transaction updates
- Linked from PR: #80560
QA / verification
- Edit an expense (e.g. amount); confirm values and UI stay correct.
- No new JS console errors on that flow.
- Spot-check high–traffic / many-reports account if possible.
Issue Owner
Current Issue Owner: @abzokhattab
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022044206573804629774
- Upwork Job ID: 2044206573804629774
- Last Price Increase: 2026-04-15
Problem
When editing an expense (merchant, amount, description, etc.), the
reportAttributesOnyx-derived value could recompute all reports in the collection (e.g. ~15k) instead of only the affected report(s).dataToIteratestarts asObject.keys(reports)(full set). On the incremental path it was only narrowed whenupdates.length > 0(report / metadata / actions / nameValuePairs changes). When only a transaction update fired,updatesstayed empty whiletransactionsUpdateswas set — the incremental branch ran butdataToIteratewas never scoped down, so transaction report IDs were merged into the full list and every report was recomputed.Expected outcome
In the incremental update path, only reports that actually need recomputation should be processed (e.g. reset
dataToIteratewhen entering that branch so transaction-driven updates do not retain the full key set).Impact
On a high–report-count account, fixing this avoided unnecessary work; author measured ~800ms improvement when updating an expense on iOS (~15k reports).
Implementation
Merged in: #87747
Related
reportAttributesrecomputing all reports on transaction updatesQA / verification
Issue Owner
Current Issue Owner: @abzokhattabUpwork Automation - Do Not Edit