-
Notifications
You must be signed in to change notification settings - Fork 467
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
Support custom V8 snapshots #3734
Comments
|
|
(The following instructions are based loosely on Electron's mksnapshot.js)
|
|
CEF will need to provide the following:
|
This could also be extracted from
|
How this might work with a CEF binary distribution (Mac ARM64 example):
The
The
|
Official builds of |
Cross-compile builds (e.g. ARM64 MacOS host building x64) place the tools in a subdirectory like:
The final output file ( Some build configurations will also have a V8 profile input file that needs to be included in the distribution. |
Note: use_v8_context_snapshot may be turned off by default in non-Official builds. See this blink-dev thread. |
On MacOS ARM64 it's necessary to run |
Looks like To debug
|
Is your feature request related to a problem? Please describe.
Custom startup snapshots can be used to speed up V8/JavaScript load time in the renderer process. See also this example of how they are currently used with Electron.
Describe the solution you'd like
Additional context
To support this capability a web application must provide a non-user-specific "ready state" that can be loaded for the purposes of creating the snapshot (e.g. library scripts that are loaded at startup, before the "actual" application runs). The generated snapshot is then distributed with the CEF application as an additional binary file. A new/separate snapshot will need to be created for each platform/architecture, each CEF/Chromium version, and each time the web application's "ready state" changes. Consequently, creation of snapshots should become part of the application build process or packaging step.
The text was updated successfully, but these errors were encountered: