-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
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 contributor
Description
coming from here
Background
Bottom tabs are one of the most frequently used and performance-critical areas of the app. Interactions must feel instant to preserve a smooth user experience.
Problem
The useSearchHighlightAndScroll hook runs multiple heavy iterations over entire collections inside a useEffect. Due to a large dependency array, this effect re-runs often - triggering expensive recalculations whenever any of them change. As a result, navigating to or from the Search screen becomes sluggish, especially on larger accounts.
Solution
Optimize collection lookups by replacing .includes with a Set and using .has() for O(1) checks. This change dramatically reduces the cost of useEffect executions.
Measurements of the affected useEffect (Jason’s state):
- Before: 2.92s
- After: 56ms
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021943045609459074645
- Upwork Job ID: 1943045609459074645
- Last Price Increase: 2025-07-09
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @kadiealexanderReactions are currently unavailable
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 contributor
Type
Projects
Status
Done