Work around a startup stall caused by expo-image on low-end Android #1801
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There seems to be an issue in
expo-image
that blocks the UI thread on startup on low-end Android. As a result, we get stuck on the splash screen for 5 extra seconds if even one of those is rendered. As a temporary fix, let's render the startup-blocking images (own avatars in the drawer and the tabbar) as plain RNImage
.This lets us hide the splash ~4.5 seconds earlier. The final time to content seems to only improve by ~2.5s, but that's harder to measure reliably because it's network-bound. (We should optimize the load time too though.)
The proper fix is to get this reported to Expo and see if it can be fixed upstream. Maybe it's something like expo/expo#21921.
(The measurements are taken with bluesky-social/atproto#1790 patched in since it was another cause of the slowdown.)
Before
Time to end of splash: 8s
Time to content: 13s
before.mov
After
Time to end of splash: ~3.5s
Time to content: ~10.5s
after.mov
Test Plan
Verified both the drawer and the tab bar render my avatar fine on iOS, Android, and web.