-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[Due for payment 2026-03-04] [$250] Eliminate redundant sorting in LHN renderItem #83025
Copy link
Copy link
Closed
Closed
Copy link
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2ExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributorsOverdue
Metadata
Metadata
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2ExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributorsOverdue
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Coming from proposal here
Background:
The LHN renders a scrollable list of all user-visible reports via a FlashList renderItem callback. For each report row, renderItem derives several values from that report's actions: the last visible action, the last displayable action, the one-transaction thread report ID, and the last IOU money request action. Report actions are stored as unsorted objects in Onyx. A collection-level Onyx callback on ONYXKEYS.COLLECTION.REPORT_ACTIONS already fires on every data change and iterates over all report-action collections to maintain pre-computed caches (allSortedReportActions, lastReportActions, lastVisibleReportActions). Additionally, the reportAttributes OnyxDerived config already computes per-report metadata reactively whenever its Onyx dependencies change.
Problem:
When the LHN re-renders on a heavy account, each renderItem call independently performs two sort operations, a filter pass, and a find scan over that report's actions, which slows down initial navigation to the inbox and degrades scroll frame rates as the number of reports grows
Solution:
Draft PR
Performance gain:
ManualNavigateToInboxTab span reduced ~30ms
Issue Owner
Current Issue Owner: @bfitzexpensifyUpwork Automation - Do Not Edit