performance: Always mount SplashScreenHider and control hide timing via prop instead of conditional rendering#86226
Conversation
timing via prop instead of conditional rendering
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
LGTM 🚀 |
|
It's surprising that such a change can affect the result by as much as 100 ms, very nice catch 🦅 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreenrecorder-2026-03-26-12-21-45-488.mp4Android: mWeb ChromeScreenrecorder-2026-03-26-12-24-56-876.mp4iOS: HybridApp2026-03-26.12.47.34.moviOS: mWeb Safarivideo_2026-03-26_12-48-27.mp4MacOS: Chrome / Safari2026-03-26.12.10.04.mov |
|
@FitseTLT |
|
@Julesssss |
|
No product review needed |
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@ZhenjaHorbach adhocs are ready! |
|
Working on it! |
|
Actually, on Android, I don't see any difference 😅 But maybe it's just a phone-specific |
|
But LGTM! |
Yeah, it's hard to catch it by only looking at the screen. I modified the code to display |
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.3.50-0 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR and checked the help site files under No help site changes are required. This PR is a purely internal performance optimization to the
These changes don't affect any user-facing feature, setting, label, workflow, or functionality that would be documented in the help site. No articles reference the splash screen or app boot behavior. |
|
Deploy Blocker #86642 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.50-8 🚀
|
Explanation of Change
Previously,
SplashScreenHiderwas conditionally rendered — it only mounted onceshouldHideSplashbecametrue. On native, the component then had to wait for the logo SVGonLoadEndcallback before starting the hide animation. This added unnecessary latency to every app start: mount time + SVG load time before the splash could begin dismissing.This PR changes the approach so that
SplashScreenHideris always mounted from the start. A newshouldHideSplashprop controls when the hide animation fires via auseEffect. On native, theonLoadEndtrigger is removed since the logo SVG is already loaded by the time we're ready to hide. The component is unmounted afteronHidecompletes to clean up.Both platforms also switch the hide callback to
useEffectEventto avoid stale closure issues without needing it in the dependency array.I measured the performance gains and I was able to lower the app startup time (
ManualAppStartupmetric) by~250ms(from initial `~3s). I tested it in a release build using the Applause account on my Samsung Galaxy Z Flip 5.Fixed Issues
$ #85883
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari