You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-12-29] [HOLD for payment 2023-11-13] [$500] Optimize SearchPage component to reduce lags when opening #30261
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Proposal: Optimize SearchPage component to reduce lags when opening
Problem: When opening the SearchPage component using search icon or cmd+k shortcut on web, the animation is pretty laggy. This is caused mostly by OptionsListUtils.getSearchOptions which takes all reports as a param and at some point it processes it by looping through all the elements. For an account with ~15k reports, this loop takes up to 500ms. What’s worth noticing, OptionsListUtils.getSearchOptions is called directly in SearchPage constructor, and it’s responsible for retrieving the data that gets set as an initial state values.
Solution: To prevent doing heavy calculations on the same time as transitioning, we should remove calling getSearchOptions from constructor and set default values to empty objects. Instead, we can load this data right after transition ends by using onEntryTransitionEnd prop in ScreenWrapper. With this solution, animation will be smooth and user will be presented with the skeleton unless the data is processed. In my measurements, it reduced the time for initial render of SearchPage from ~1400ms to ~76ms. While profiling, JS Heap went down from 435-840mb range to 90-450mb.
changed the title [-]Optimize SearchPage component to reduce lags when opening[/-][+][$500] Optimize SearchPage component to reduce lags when opening[/+]on Oct 24, 2023
changed the title [-][HOLD for payment 2023-11-13] [$500] Optimize SearchPage component to reduce lags when opening[/-][+][HOLD for payment 2023-12-29] [HOLD for payment 2023-11-13] [$500] Optimize SearchPage component to reduce lags when opening[/+]on Dec 22, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.15-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-12-29. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@mountiny] The PR that introduced the bug has been identified. Link to the PR:
[@mountiny] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@mountiny] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@TMisiukiewicz / @robertKozik] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
[-]Optimize SearchPage component to reduce lags when opening[/-][+][$500] Optimize SearchPage component to reduce lags when opening[/+]melvin-bot commentedon Oct 24, 2023
Job added to Upwork: https://www.upwork.com/jobs/~017fbfc71ea6da3266
melvin-bot commentedon Oct 24, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik (
External)mountiny commentedon Oct 24, 2023
Sorry @laurenreidexpensify matt is ooo now
30 remaining items
mountiny commentedon Nov 20, 2023
Not needed, closing
[-][HOLD for payment 2023-11-13] [$500] Optimize SearchPage component to reduce lags when opening[/-][+][HOLD for payment 2023-12-29] [HOLD for payment 2023-11-13] [$500] Optimize SearchPage component to reduce lags when opening[/+]melvin-bot commentedon Dec 22, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 22, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.15-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-12-29. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Dec 22, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed: