[No QA] perf: remove unused props and subscriptions from LHN rendering pipeline#86227
Conversation
…sed-props-and-subscriptions # Conflicts: # src/components/LHNOptionsList/LHNOptionsList.tsx # src/components/LHNOptionsList/OptionRowLHNData.tsx # src/components/LHNOptionsList/types.ts
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d3013dbd5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Theres a bunch of conflicts |
…sed-props-and-subscriptions # Conflicts: # src/components/LHNOptionsList/LHNOptionsList.tsx # src/components/LHNOptionsList/OptionRowLHNData.tsx # src/components/LHNOptionsList/types.ts
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-20.at.12.47.42.AM.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
Keep branch's removal of unused props/subscriptions and deepEqual pattern. Upstream added itemReportActions (unused), areReportErrorsEqual (redundant with React Compiler), and extra type imports (for removed props).
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.49-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.3.49-2 🚀
|
Explanation of Change
Strips unused props and subscriptions from the LHN rendering pipeline to reduce unnecessary work per item.
OptionRowLHNData: Removed
deepEqual+useRefmemoization ofoptionItem. React Compiler auto-memoizes each expression in the downstreamOptionRowLHNindependently, so stabilizing the whole object reference is unnecessary. Also removed remaininguseMemoforfinalOptionItem(pure derivation the compiler handles).LHNOptionsList: Removed 7 unused props passed to
OptionRowLHNDatathat were never consumed:reportActions,iouReportReportActions(report action collections)transaction,lastReportActionTransaction(transaction objects)transactionViolations(collection subscription)preferredLocale,activePolicyID(scalar values)This also eliminates 2
useOnyxsubscriptions (transactionViolations,activePolicyID) and related computation inrenderItem.OptionsListUtils
createOption: Refactored from 11 positional parameters to a single named-params object for readability and to eliminateundefinedplaceholder arguments at call sites.Benchmark:
getFilteredOptions with search valueimproved by 86% (12.1ms to 1.7ms). LHN functions neutral with no regressions.Fixed Issues
$ #86311
PROPOSAL:
Tests
Internal refactor removing unused props and subscriptions. No user-facing behavior changes.
Offline tests
No changes to offline behavior.
QA Steps
No QA needed. Internal refactor only, no user-facing changes.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari