[portable-cr] RFR: Portable C/R [v2]
Timofei Pushkin
duke at openjdk.org
Fri Jul 12 11:37:20 UTC 2024
On Thu, 11 Jul 2024 19:37:14 GMT, Charles Nutter <headius at openjdk.org> wrote:
>> Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update full name
>
> I am excited to see this land!
>
> As a test case, may I propose JRuby?
>
> The JRuby startup story is very complex. We are an implementation of Ruby on the JVM, and since Ruby applications start from source we must boot up our pure-Java parser, compiler, and interpreter every time. Portions of JRuby itself are written in Ruby and must be parsed and loaded, and even the base "hello world" startup loads a large amount of Ruby code to bootstrap the standard library. On top of it all, we load thousands of classes at boot and generate hundreds more for invokedynamic method handle chains and early JIT-to-bytecode of early-loaded Ruby code.
>
> Bypassing any of this would be a help for us.
>
> I have had good results from using CRaC that bring us within a few times slower than the C implementation of Ruby (which is designed to start quickly), but the limitation of running only on Linux does not help the majority of Ruby developers that use MacOS.
>
> Our other startup-time strategies are to disable all but tier 1 (-XX:TieredStopAtLevel=1, yay C1), or the new winner Leyden EA builds (which give us a 50% reduction in baseline startup).
>
> I am interested in giving this a try, but someone else might get to it first! Running JRuby's baseline startup is easy:
>
> * Download JRuby tarball or zip from [jruby.org](http://jruby.org)
> * Run `bin/jruby -e 1`
> * Bonus: run `bin/jruby -S gem list` which will list all preinstalled standard library "gems" and takes a couple of seconds on most systems.
>
> Please feel free to reach out to me here or as @headius just about everywhere else!
@headius Glad to see your interest in the project! Portable CRaC should indeed help by reducing the time it takes JVM to load classes and process invokedynamics.
Currently the project is still in its early stages, it has been merged in a branch separate from CRaC's main one where it will be developed further. I am still working on making it work correctly in all scenarios, so I am not sure if JRuby, being a relatively complex project, will be handled correctly on the current development stage. But thanks for the suggestion, I will be trying JRuby on portable CRaC when I get back to the project.
-------------
PR Comment: https://git.openjdk.org/crac/pull/155#issuecomment-2225381737
More information about the crac-dev
mailing list