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

snack-runtime loading time regression on Hermes engine #494

Open
YoussefHenna opened this issue Oct 16, 2023 · 0 comments
Open

snack-runtime loading time regression on Hermes engine #494

YoussefHenna opened this issue Oct 16, 2023 · 0 comments
Assignees

Comments

@YoussefHenna
Copy link

YoussefHenna commented Oct 16, 2023

Summary

Hey Expo Team 👋,

I'm working with the Draftbit team and we have realized that our live preview app (our wrapper around snack-runtime) for Expo 48 is drastically slower than our version for Expo 47. After some investigating, we discovered that the culprit was that the new default for the javascript engine is now Hermes instead of JavascriptCore. Hermes shows an extreme degradation in the speed of loading and transpiling a snack's files and rendering the final output. Hermes is ~2x slower than JSC. As an example with a somewhat large app, Hermes loads in 3.3 minutes while JSC loads in 1.3 minutes. As the app gets larger, the performance difference also gets larger.

Here are some logs for a large app from snack-runtime with profiling enabled for Hermes and JSC. Notice how transpiling of each file is drastically slower, and the final time it took to complete.

48 hermes.txt

48 jsc.txt

For now, we're manually configuring our app to use JSC. I'm not sure if this is a bug on your end or maybe that Hermes is just not well suited for a use case where code is transpiled at runtime.

Thanks for taking the time to read this, let me know if you need any more details.

What platform(s) does this occur on?

Android, iOS

SDK Version

48

Reproducible demo or steps to reproduce from a blank project

Load any project using the snack-runtime on the Hermes engine vs on the JSC engine to see the difference in loading times.

@byCedric byCedric self-assigned this Oct 16, 2023
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

No branches or pull requests

2 participants