Giter VIP home page Giter VIP logo

Comments (10)

chrisseaton avatar chrisseaton commented on July 29, 2024 7

The way that the SubstrateVM works is that you can run the interpreter up until a certain point and then stop execution and freeze the heap at that point for compilation, producing an executable which resumes executing from that point.

This means we have the possibility to go further than for example Crystal, allowing people to load and initialise gems at compile time. We could take a Rails application and create an image from that so that all you do at startup is open the server sockets and start running.

This is a research area though.

from truffleruby.

havenwood avatar havenwood commented on July 29, 2024 2

The Substrate Virtual Machine (SVM) looks promising for TruffleRuby startup speed: https://github.com/graalvm/truffleruby/blob/master/doc/user/svm.md

from truffleruby.

ylluminate avatar ylluminate commented on July 29, 2024 2

@chrisseaton SEXY! Lisp and Smalltalk here we come!!!!! This is going to be PERFECT with Docker images. Imagine pre-warmed apps? WOW.

from truffleruby.

ch1c0t avatar ch1c0t commented on July 29, 2024 1

@chrisseaton That's fascinating. I have been wanting something like Smalltalk images for Ruby for a long time.

Could SubstrateVM become open source at some time in the future, or it is unknown at the moment?

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024 1

I can't say anything about future plans like that, sorry.

from truffleruby.

wjordan avatar wjordan commented on July 29, 2024 1

Could SubstrateVM become open source at some time in the future, or it is unknown at the moment?

Looks like SubstrateVM indeed became open source under the GPLv2 license, on Dec 12, 2017 (see commit 9fa7c846 in the graalvm/graal project).

from truffleruby.

ylluminate avatar ylluminate commented on July 29, 2024

@havenwood it's not crystal, BUT that's super promising! Wow.

from truffleruby.

eregon avatar eregon commented on July 29, 2024

See also http://nirvdrum.com/2017/02/15/truffleruby-on-the-substrate-vm.html by @nirvdrum for more details about SVM in the context of TruffleRuby.

I recently found a rather big gain (~1s) on startup of TruffleRuby on JVM, we should re-measure startup.
Further steps could include investigating how to load RubyGems faster as that takes a significant amount of time, even more so on SVM where startup is otherwise around 100ms.

from truffleruby.

ch1c0t avatar ch1c0t commented on July 29, 2024

Ok, I understand. Sorry for asking.

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024

Yes, sorry I should have come back here and said this. If you download GraalVM today you can run with --native and get startup time similar to MRI. And it's now open source so you can build with jt build native.

from truffleruby.

Related Issues (20)

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.