Problem
Navigating to the Search screen on web shows a brief spinner/loading delay when first entering the screen. This is caused by lazy loading of SearchFullscreenNavigatorScreen, which defers the module load until the first navigation — adding significant overhead on cold navigation.
Telemetry from the ManualNavigateToReports Sentry span shows:
| Metric |
With lazy loading (prod) |
Without lazy loading |
Δ |
| Cold nav avg |
1699.5 ms |
1323.7 ms |
−375.8 ms (−22%) |
| Cold nav worst |
2117 ms |
1488 ms |
−629 ms |
| Warm nav avg |
32.7 ms |
39.1 ms |
+6.4 ms |
Cold navigation (first visit per session) is ~28% slower with lazy loading. Warm navigations (subsequent visits) are negligibly impacted.
Expected behavior
Navigating to Search from Home → Spend should be instant with no visible spinner on page transition.
Actual behavior
A spinner appears briefly when first navigating to Search on web, caused by lazy module loading.
Solution
Remove lazy loading from SearchFullscreenNavigatorScreen in TabNavigator.tsx. Since Search is visited frequently enough that the deferred load cost outweighs any bundle-size benefit, eager loading eliminates the spinner entirely.
Platforms affected
- Web (Chrome / Safari / mWeb)
Issue Owner
Current Issue Owner: @mallenexpensify
Issue Owner
Current Issue Owner: @ZhenjaHorbach
Problem
Navigating to the Search screen on web shows a brief spinner/loading delay when first entering the screen. This is caused by lazy loading of
SearchFullscreenNavigatorScreen, which defers the module load until the first navigation — adding significant overhead on cold navigation.Telemetry from the
ManualNavigateToReportsSentry span shows:Cold navigation (first visit per session) is ~28% slower with lazy loading. Warm navigations (subsequent visits) are negligibly impacted.
Expected behavior
Navigating to Search from Home → Spend should be instant with no visible spinner on page transition.
Actual behavior
A spinner appears briefly when first navigating to Search on web, caused by lazy module loading.
Solution
Remove lazy loading from
SearchFullscreenNavigatorScreeninTabNavigator.tsx. Since Search is visited frequently enough that the deferred load cost outweighs any bundle-size benefit, eager loading eliminates the spinner entirely.Platforms affected
Issue Owner
Current Issue Owner: @mallenexpensifyIssue Owner
Current Issue Owner: @ZhenjaHorbach