-
Notifications
You must be signed in to change notification settings - Fork 58
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
Produce Hermes bytecode and use it on Android #2003
Conversation
@rachelmcr can you test the apk linked above on your slower test device(s)? Note we should also be able to get the exact starting time thanks to the new track property introduced in wordpress-mobile/WordPress-Android#11411 |
Using the new track, it counted |
I tested the new WPAndroid APK on my moto e5 play phone, and it significantly improves the load time for me. I checked the new track property and the load time was between |
Results of manual tests on this PR (cases taken from https://github.com/wordpress-mobile/test-cases/tree/8126e8460ea64bad3e765baec125ae10093d9179/test-suites/gutenberg):
Gallery-1
Gallery-2
Gallery-3
Gallery-4
MediaText-4
Shortcode-1
Spacer-1
Button-1
Button-2
Button-3
Button-4
Group-1
Writing flow |
Works fine, but the text cursor is stuck on first character when undoing/redoing text events.
Crash everytime I try it :( - doesn't crash on
Stumbled upon an existing issue: #1651
Stumbled upon an existing issue: #729 |
Reminder to self: The Appium tests are bundling the JS app into the demo app to send it for testing so, should get the bytecode version there too. |
Looks good.
Got a crash when adding a button block to a media&text block. Note: No crash on current
Looks good. |
Indeed, crashes for me as well, with Doesn't crash on SOURCE mode (using Metro). Shall try with binray mode using the string JS app bundle to see what happens there. |
You can trigger optional full suite of UI tests for these changes by visiting CircleCI here. |
You can trigger optional full suite of UI tests for these changes by visiting CircleCI here. |
I've added some (temporary) debugging facility, to quickly switch between the bytecode and Text JS versions of the bundle. To use, add What one can immediately see is that Dark Mode doesn't work in the bytecode version. To me, that's an indication of either the two bundles be out of sync or, indeed the bytecode version has various issues atm. |
e4d7887
to
35e46d6
Compare
We should also give this experiment a go on RN 0.62 to see if the issues are manifesting there or not. |
The Hermes bytecode improvement has been merged via #2780 so, closing this PR. |
Fixes #1660
This PR adds the Hermes command line to produce the binary bytecode version of the JS bundle for Android, and sets it as the asset to be loaded by the parent app.
Changes in this PR:
bundle:android:bytecode
yarn script. Is uses the Hermes binary to compile theApp.js
bundle into binary bytecode that Hermes' runtime can use to offer better performance on Android. This script is ran automatically as part of thebundle
script too.index.android.bytecode
from the assets folder. That's the code the parent app runs to load the bundle so, with this change the parent app will use the binary bytecode file.Comparison on Pixel 2XL Android 10
Also measured the same post opening on a Nexus 5X (Android 7.1.2) and loading takes ~3secs.
Notes
There are more than a few warning emitted by Hermes while compiling the current App bundle into bytecode. Will document here but now sure yet if these are actually important or not. Will probably need to go over these one-by-one to assess:
To test:
PR submission checklist:
RELEASE-NOTES.txt
if necessary.