Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around a startup stall caused by expo-image on low-end Android #1801

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Nov 3, 2023

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 RN Image.

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.

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, really great

@pfrazee pfrazee merged commit 8747c21 into main Nov 3, 2023
4 checks passed
@pfrazee pfrazee deleted the dont-block-startup-expo-img branch November 3, 2023 02:33
@gaearon
Copy link
Contributor Author

gaearon commented Nov 3, 2023

Filed Expo bug: expo/expo#25201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants