Hi,
Startup times are important for the command line toolkit that I have
been writing in JRuby.
I did some very quick tests once the JRuby 1.5.0RC1 release was made,
with regards to startup times, e.g.
jruby -b -v -e "require 'rubygems'"
The results comparing execution times on a Windows OS, running Java
1.6.0_19 32bit, client mode, between 1.4 and 1.5RC1 showed a good
improvement.
JRuby 1.4 1093ms
JRuby 1.5RC1 812ms
Ignoring the first execution to allow Windows to cache/load any JVM
DLLs.
Based on the above I started to think that I should see some good
improvements with my own command line tools. However, this was not the
case:
JRuby 1.4 1390ms
JRuby 1.5RC1 1438ms
It was a little disappointing not to see a similar drop.
Requesting a loadService timing, I can see that the RubyGems require
step takes pretty much the same amount of time as in the previous tests,
with the biggest additional chunks of time, being for requiring, dbi,
erubis and java.
Performing some independent tests for each of these, it looks as if in
general the times are better in 1.5RC1, which got me wondering what the
cause of the slow down was, and as it turns out, it is still in the
require, but seems to be due to a compound effect of requiring multiple
gems. For example:
jruby -b -v -e "require 'rubygems'; require 'dbi'"
JRuby 1.4 1235ms
JRuby 1.5RC1 1000ms
As can be seen, the difference has reduced slightly, now lets add
another library:
jruby -b -v -e "require 'rubygems'; require 'dbi'; require 'java'"
JRuby 1.4 1234ms
JRuby 1.5RC1 1125ms
As can be seen the 1.4 times have not really changed when java is added,
but the 1.5RC1 times have.
Then adding the next gem, we get:
jruby -b -v -e "require 'rubygems'; require 'dbi'; require 'erubis';
require ‘java’"
JRuby 1.4 1266ms
JRuby 1.5RC1 1203ms
The gap shrinks further.
Just something else interesting, was the position of the requires, if
java was first, then the times seem to come through slower.
I am hoping that the cause of this is something simple, and that with
further tests that it can be identified and rectified, as this would
dramatically improve the startup times if we can keep the initial
improvement.
Great work guys with the 1.5RC1 release, other than the above, I have
not found any issues. In general once the startup has been overcome, the
performance does seem better.
Thanks
Regards
Matthew W.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email