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

V8 startup snapshot #66

Closed
CedricGuillemet opened this issue Nov 10, 2023 · 8 comments
Closed

V8 startup snapshot #66

CedricGuillemet opened this issue Nov 10, 2023 · 8 comments
Assignees
Milestone

Comments

@CedricGuillemet
Copy link
Contributor

V8 allows (looks more mandatory) to use snap shots. Basically, it's the content of V8 memory after code parsing. It should be faster to load. Can we use it with Babylon.js instead of providing .js files? is it faster? lower footprint?

@CedricGuillemet
Copy link
Contributor Author

resources : https://github.com/electron/mksnapshot

@thomlucc thomlucc added this to the 7.0 milestone Nov 13, 2023
@CedricGuillemet
Copy link
Contributor Author

question on external data here : Kudo/v8-android-buildscripts#38

@CedricGuillemet
Copy link
Contributor Author

Having startup snapshot as external file is a bit painful:

  • Files must be added to various build pipelines
  • It's not possible to have the .bin inside jniLibs because it's not an .so
  • Loading a .bin from assets means there is a way to get package path
  • specific preprocessor for Android and ABI to load the correct file

Before doing more work on this task, here are the possibilities:

  • Kudo is ok to release V8 with non-external startup -> no more .bin to handle
  • we do the the change in JSRuntimeHost, BabylonNative -> more code and data to handle on our side
  • we fork Kudo's repo, add a patch to change the flag and release the v8-android package in our org -> more work, more builds, ..

Repo important flag is here : https://github.com/Kudo/v8-android-buildscripts/blob/fe8482757c88b7289cc92ad6888596278372c471/scripts/env.sh#L51

This was referenced Nov 14, 2023
@CedricGuillemet
Copy link
Contributor Author

Fixed by building and using V8 without external snapshot : https://github.com/CedricGuillemet/v8-android-buildscripts/actions/runs/7168604143

@CedricGuillemet
Copy link
Contributor Author

I've pinged the maintainer on v8-android repo and on X.

@CedricGuillemet
Copy link
Contributor Author

Kudo is ok to release an package (jit + intl?) that doesn't need external startup data. I'll check with him the details

@CedricGuillemet
Copy link
Contributor Author

@CedricGuillemet
Copy link
Contributor Author

fixed with #70

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