Skip to content

[Due For Payment 2026-04-16] Remove unnecessary subscriptions from the LHN #86311

Description

@JS00001

Strip unused props and subscriptions from the LHN rendering pipeline to reduce unnecessary work per item.

OptionRowLHNData: Removed deepEqual + useRef memoization of optionItem. React Compiler auto-memoizes each expression in the downstream OptionRowLHN independently, so stabilizing the whole object reference is unnecessary. Also removed remaining useMemo for finalOptionItem (pure derivation the compiler handles).

LHNOptionsList: Removed 7 unused props passed to OptionRowLHNData that were never consumed:

reportActions, iouReportReportActions (report action collections)
transaction, lastReportActionTransaction (transaction objects)
transactionViolations (collection subscription)
preferredLocale, activePolicyID (scalar values)
This also eliminates 2 useOnyx subscriptions (transactionViolations, activePolicyID) and related computation in renderItem.

OptionsListUtils createOption: Refactored from 11 positional parameters to a single named-params object for readability and to eliminate undefined placeholder arguments at call sites.

Benchmark: getFilteredOptions with search value improved by 86% (12.1ms to 1.7ms). LHN functions neutral with no regressions.

PR Here: #86227

Issue OwnerCurrent Issue Owner: @ShridharGoel

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions