Comments (6)
There is a v8.dev blog post explaining the high-level concepts, but it's probably best to just look at the test cases, e.g. this one
from electron-link.
There's a blog post on this: https://v8project.blogspot.de/2017/05/energizing-atom-with-v8s-custom-start.html
from electron-link.
@hashseed We are still using V8 5.6 in Atom and from the blog post it seems that this is available in 5.7. Upgrading to Electron 1.7 would bring V8 up to 5.8
/cc: @as-cii
from electron-link.
@hashseed Just got around to reading the blog post. This looks promising, but it's not immediately clear to me how we'd use these native APIs. Currently we just run mksnapshot
on our heavily doctored, concatenated script, but it looks like we'd need to write something custom in C++ maybe to register native functions. Also, a lot of those native functions are provided by Blink, Node, etc.
What do you think would be the best general path forward for using these capabilities? The ideal scenario would be to somehow start a normal Atom window and get it to a certain point in its startup cycle, then create a snapshot from there. But it looks like in those APIs you need to create a specific SnapshotCreator
object which maintains its own isolate. Could we somehow hack Blink to use a snapshot creator's isolate for a new window so that we could do this? Or assuming that's not possible, what would be your overall strategy for transitioning from the giant electron-link
script plus mksnapshot
to something wouldn't need to defer?
/cc @as-cii
from electron-link.
There's a blog post on this: https://v8project.blogspot.de/2017/05/energizing-atom-with-v8s-custom-start.html
Hi, is this link still available? I clicked it and jump to https://v8.js.cn/blog/custom-startup-snapshots/, this blog looks like outdated.
from electron-link.
@hashseed Is there a documentation for including native modules in the snapshot?
from electron-link.
Related Issues (10)
- `auxiliaryData` not documented
- leveldown@^1.6.0 dependency breaks builds on Node.js v10.0.0 HOT 7
- Lack of documentation HOT 1
- Generating snapshot script fails with "Cannot replace with lazy function because the supplied node does not belong to an assignment" HOT 6
- Electron-link cannot bundle @babel/core
- Cannot find module 'indent-string'
- bitcoin
- So close, but cannot get it to work (elaborate snippets inside)! HOT 3
- __dirname doesn't work in modules that are part of the snapshot HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-link.