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
[Due for payment 2026-03-13] [Performance] Hide useCustomRootStackNavigatorState instead of removing it from the render tree #83950
The Inbox tab hosts the LHN — a list of reports that can span thousands of components in large accounts. On web, useCustomRootStackNavigatorState controls which screens stay in the render tree. It aggressively removes the previous screen when it is a full-screen navigator like Inbox. On iOS, the same hook keeps the previous screen mounted but hidden. Separately, usePreloadFullScreenNavigators fires after landing on a new tab and rebuilds adjacent tab navigators so switching feels instant.
These two systems operate independently — one tears down screens, the other rebuilds them. In practice, switching away from Inbox unmounts the entire LHN — every report row, every hook, every Onyx subscription. Then the preloader rebuilds it from scratch a second later. Both operations are extremely heavy, and together they spike the CPU to 100% for several seconds.
Problem:
When a user navigates from Inbox to any other tab on web, if the LHN contains a large number of reports, the CPU spikes to 100% for several seconds, causing the app to become unresponsive.
Solution:
Update the useCustomRootStackNavigatorState so the Inbox stays in the render tree (just hidden) on tab switch — the LHN is never torn down. Additionally, add a guard in usePreloadFullScreenNavigators that skips preloading when the navigator is already present in the routes — the LHN is never rebuilt from scratch.
Performance impact:
On heavy customer account with 5k items in the LHN, navigating away from Inbox on web caused 15-20s spike on the CPU. With these changes, navigating becomes almost instant, with CPU reaching 100% for <1s.
changed the title [-][Performance] Hide useCustomRootStackNavigatorState instead of removing it from the render tree[/-][+][Due for payment 2026-03-13] [Performance] Hide useCustomRootStackNavigatorState instead of removing it from the render tree[/+]on Mar 6, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.31-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
[-][Performance] Hide useCustomRootStackNavigatorState instead of removing it from the render tree[/-][+][Due for payment 2026-03-13] [Performance] Hide useCustomRootStackNavigatorState instead of removing it from the render tree[/+]melvin-bot commentedon Mar 6, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 6, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.31-12 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 2026-03-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 6, 2026
Triggered auto assignment to @garrettmknight (
Awaiting Payment)JS00001 commentedon Mar 6, 2026
Closing since no external contributor was assigned (payments handled in another issue)