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 Owner
Current Issue Owner: @ShridharGoel
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 Owner
Current Issue Owner: @ShridharGoel