GithubHelp home page GithubHelp logo

Comments (6)

hashseed avatar hashseed commented on July 21, 2024 1

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.

hashseed avatar hashseed commented on July 21, 2024

There's a blog post on this: https://v8project.blogspot.de/2017/05/energizing-atom-with-v8s-custom-start.html

from electron-link.

Ben3eeE avatar Ben3eeE commented on July 21, 2024

@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.

nathansobo avatar nathansobo commented on July 21, 2024

@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.

wzt12353202 avatar wzt12353202 commented on July 21, 2024

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.

aminya avatar aminya commented on July 21, 2024

@hashseed Is there a documentation for including native modules in the snapshot?

from electron-link.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.