JRuby startup costs [was: Process-level fork on OpenJDK...is it madness?]

Marrows, George A (GE Energy) george.marrows at ge.com
Wed Nov 30 01:36:27 PST 2011


Hi Charlie - could you explain this a little more?

> The bigger part of startup is loading all the third-party libraries
> that a user might need in their app. Those sources need to be parsed
> every time, turned into an AST, and partially executed to boot. All
> the code that does parsing and interpretation is cold initially, and
> so we have slow startup no matter what we do.
> 
> We have experimented with serializing the parse tree or precompiling
> to bytecode, but neither case was actually faster than our parser.

Are you saying that 
  ruby source on disk -> parse tree in memory -> bytecode in JVM
takes the same amount of time as
  bytecode on disk -> bytecode in JVM
? If so, how do you think that is?

Or just that any difference is lost as noise in the bigger start-up
cost?

-- George


More information about the mlvm-dev mailing list