Skip to content

[Due for payment 2026-04-28] [$250] Performance: reportAttributes recomputed all reports on transaction-only Onyx updates #87936

@mountiny

Description

@mountiny

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 OwnerCurrent 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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorOverdue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions