Skip to content

[Due for payment 2026-05-26] Navigating to Search on web shows a spinner due to lazy loading overhead #90758

@mountiny

Description

@mountiny

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 OwnerCurrent Issue Owner: @mallenexpensify
Issue OwnerCurrent Issue Owner: @ZhenjaHorbach

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ImprovementItem broken or needs improvement.Task

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions