Skip to content

[Metrics] Improve ManualAppStartup #77171

Open
41 of 42 issues completed
Open

Description

@rlinoz

Objective

We want to improve the App Start Time performance metric.

Target: 5 seconds

You can check the current values and monitor progress at:
https://expensify.sentry.io/dashboard/166320/?statsPeriod=14d

Issue OwnerCurrent Issue Owner: @roryabraham

Activity

  1. self-assigned this
    on Dec 9, 2025
  2. rlinoz commented on Dec 9, 2025

    @rlinoz
    ContributorAuthor

    Related #74832

  3. rinej commented on Dec 15, 2025

    @rinej
    Contributor

    Hello, I'd like to work on that issue

  4. melvin-bot commented on Dec 18, 2025

    @melvin-bot

    @rinej, @rlinoz Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  5. melvin-bot commented on Dec 23, 2025

    @melvin-bot

    @rinej, @rlinoz 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  6. rlinoz commented on Dec 23, 2025

    @rlinoz
    ContributorAuthor

    Hey @rinej any progress on this one?

  7. melvin-bot commented on Dec 27, 2025

    @melvin-bot

    @rinej, @rlinoz Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  8. rinej commented on Dec 29, 2025

    @rinej
    Contributor

    Hey! I was focusing on some other auth errors and other metrics, but I’m coming back to this now.
    I’ve started the investigation already. We looked into reducing the bundle size, but it didn’t give the expected results. I do have some potential ideas that could improve it and I’ll continue working on it

  9. 321 remaining items

  10. roryabraham commented on Oct 24, 2026

    @roryabraham
    Contributor

    Moving back to weekly. There are a handful of ongoing things that should help with this:

  11. roryabraham commented on Nov 4, 2026

    @roryabraham
    Contributor

    Some meaningful action in this thread: https://expensify.slack.com/archives/C05LX9D6E07/p1793654736576629, with a few PRs merged to address the regressions

  12. roryabraham commented on Nov 17, 2026

    @roryabraham
    Contributor

    Lots of good improvements last week, shoutout to @twilight2294 for a proposing a few of them in #expensify-open-source.

    Our P95 is still floating closer to 6s than to 5s unfortunately, and efforts are a bit spread out:

    • React optimizations/component decompositions
    • (stalled) PGO: this looks like it will help by a few hundred milliseconds, but is frankly pretty complex for the gains we see
    • React Native upgrades. A few weeks ago I saw that there are some exciting improvements to the RN core coming in upcoming versions. Unclear if this will land in RN 0.89 or later.
    image
    • We're also working on migrating more animations to Reanimated 4 CSS animations, which takes CPU load off the main thread.
    • We're switching chat lists to Legend List, which has a bigger impact on other metrics than on this one.
    • General Onyx improvements
    • Switching personalDetails to a collection

    @MelvinBot do a status update on this issue:

    • What efforts are in the works that will (allegedly) improve ManualAppStartup
    • Which improvements have had the biggest impact, and what should we look at next?
  13. MelvinBot commented on Nov 17, 2026

    @MelvinBot
    Contributor

    Status as of November 17

    The clearest demonstrated startup win remains removing Realm from iOS. Recent React/Onyx work is promising, but several changes only reached staging yesterday. We should distinguish shipped improvements, local benchmarks, and production ManualAppStartup impact.

    What’s underway?

    Effort Status Evidence / expected benefit
    React optimizations and narrower subscriptions Shipping incrementally twilight2294’s incremental report-actions computation reached production yesterday; incremental report-error computation and personal-details subscription narrowing reached staging. Large reductions in update/render work, not yet demonstrated startup-span reductions.
    Defer nonessential startup work Fraud-protection deferral reached staging yesterday Strongest direct recent startup benchmark found: iOS simulator splash hide 376ms sooner with 10k reports; 168ms sooner on a fresh install. Android already performs these SDK calls off its main thread.
    General Onyx improvements SQLite upgrade and array-identity preservation shipped; shared-selector caching remains open SQLite benchmark: Android splash hide 208ms / 7% faster, iOS approximately flat. Other results primarily measure update/navigation CPU, not startup.
    personalDetails → collection Migration remains open, with backend rollout dependencies Potentially substantial for large accounts: Android emulator initial-merge benchmark 6.7s → 0.46s. That is merge time, not end-to-end startup; the subscription-narrowing PR above does not complete this migration.
    PGO Stalled/open; foundation unmerged Physical-device benchmarks suggest 186–252ms on Android, approximately 46ms on iOS. Android testing disabled FullStory processing; the first proposed phase is report-only evaluation, not shipping optimized binaries.
    React Native upgrades RN 0.88 / Expo 58 upgrade remains open The screenshot is encouraging upstream evidence, not an Expensify startup benchmark. Its CPU/layout/scroll improvements cannot be translated into startup savings, and inclusion in 0.89 versus later is unconfirmed.
    Reanimated 4 CSS animations Migration open; first migration PR unmerged Synthetic animation benchmarks—not a demonstrated ManualAppStartup win. Native benefits depend on configuration; CSS migration alone did not establish a native CPU improvement.
    Legend List Foundations shipped; core chat migration remains open/held Promising scrolling, CPU and memory benchmarks. Not yet a completed chat rollout or demonstrated production startup improvement.

    The October web-delivery list has largely shipped: Cloudflare-only hosting, Brotli, deduplicated fonts, and lazy decorative SVGs. Brotli delivered an approximately 20% smaller production main bundle; SVG splitting removed another 141KB Brotli from the initial bundle. Those are separate comparisons—not additive startup percentages.

    Which improvements have mattered most?

    1. Best production startup evidence: iOS Realm removal. The August post-deploy comparison found:

      iOS ManualAppStartup p95 — historical high-device-class cohorts
      Pre-fix   ████████████████  10.88s
      Post-fix  ████████████       7.97s
      

      Median improved 4.09s → 2.39s. Approximately 1.3s of median savings was attributed to removing NativeYAPLLoad; concurrent changes contributed too. This is historical cohort evidence, not today’s fleet P95.

    2. Best published web production evidence: preserving bundle-cache hashes. The post-deploy analysis measured 30.9% less transferred data per bundle load and 7.9% lower pageload P90, with median essentially unchanged. That is pageload—not ManualAppStartup.

    3. Most promising recent direct startup benchmarks: fraud-protection deferral and the Onyx SQLite upgrade above. Many larger-looking percentages elsewhere concern scrolling, individual updates, or navigation—not startup.

    What should we look at next?

    1. Get a current, matched-trace breakdown of the remaining P95. Segment by OS, device class, native/JS release, cold versus reused process, and account size. Store rollout and instrumentation changes make aggregate week-over-week comparisons unreliable.

      Importantly, BootsplashVisible does not cover all JS startup: it starts in a React effect. Everything preceding it is not necessarily native work, and subtracting separately aggregated percentiles cannot establish attribution.

    2. Verify the latest shipped/staging improvements before opening more speculative tracks. Prioritize production confirmation of fraud-protection deferral, SQLite, and incremental derived-data updates once adoption is sufficient.

    3. Unblock personalDetails collection migration and continue removing unnecessary critical-path work. Both have concrete large-account evidence. Check whether saved merge/render work actually precedes splash hide rather than assuming all OpenApp processing gates startup.

    4. Keep PGO lower priority; pursue RN and Legend List for their broader benefits. Their value may be real without making them the shortest route from approximately 6s to 5s.

    Evidence limit: this update uses linked benchmarks and existing production analyses; it does not establish a fresh production P95 or attribute last week’s aggregate movement to individual PRs.


    view run

  14. roryabraham commented on Nov 18, 2026

    @roryabraham
    Contributor

    Merged #107152 which is related to this, even though it only helps on accounts whose preferredLocale is not English, so only 55k or <1% of accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions