Now that we've gotten JRuby's own startup time down pretty low, I
thought I'd start examining the startup time of nontrivial real-world
apps. The biggest one of those, obviously, is Rails.
Rails 2.1 with Mongrel (in development mode) starts up in about 12
seconds on my machine, using soylatte Java 6, on OS X 10.5, a Core Duo
2.16GHz processor, and 2GB of memory. C Ruby starts up in about 8
seconds, so we're actually not so far off the mark here.
I added a ParserStats MBean to explore whether parse time might be a
problem. Of course without knowing MRI's parse time, it's hard to know
if this is good or bad, but here's the stats I gathered:
* A total of 5.512MB of source are parsed during Rails startup
* Total parse time spent was around 3.08s
* There were 503 parses due to file loads
* There were 1943 parses due to evals
Given that the total parse time (including AST construction) was only
about 3 seconds, it doesn't seem like parsing is the largest problem for
our startup. Even if parse time was completely eliminated, we'd still be
a full second slower than MRI. If anyone knows how to gather metrics on
MRI parse time, please let me know.
So for the moment I'm going to explore other possible bottlenecks in
JRuby startup that might be slowing down Rails startup. Any information
or help you've gathered would be appreciated.
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email