Perhaps jruby could take some lessons from recent patches in 1.9.3 that
speed up load/require times? Worth a jira?
-roger-
If you can help pick out the changes they made…sure. I wouldn’t be
surprised if there were things we could improve.
- Charlie
I’ve been thinking about start up time. For JRuby developers, slow
start up time is painful since they restart JRuby many times.
One big reason of slow start up time comes from loading JRuby’s huge
jar archive. I don’t have any code right now, but I think Jython style
is worth to consider. Jython start up is slow at the first time but
fast second time and later. This is because Jython creates relatively
small jar archives in a special directory at first time and uses those
for later start ups.
Another big reason of slowness comes form creating Ruby runtime
instance. Also I don’t have any code now, but I think Ruby runtime can
do some jobs lazily.
I think we can improve start up time though I’m not sure how big it is.
-Yoko
On Fri, Feb 17, 2012 at 8:36 PM, Charles Oliver N.
One big reason of slow start up time comes from loading JRuby’s huge
jar archive. I don’t have any code right now, but I think Jython style
is worth to consider. Jython start up is slow at the first time but
fast second time and later. This is because Jython creates relatively
small jar archives in a special directory at first time and uses those
for later start ups.Another big reason of slowness comes form creating Ruby runtime
instance. Also I don’t have any code now, but I think Ruby runtime can
do some jobs lazily.
Those seem like good ideas. I do hate the startup time of jruby apps.
Sorry, mine is a bit off topic.
Roger is talking about the time for “require” not start up.
But, improving start up time is in my mind.
-Yoko
Another big reason of slowness comes form creating Ruby runtime
instance. Also I don’t have any code now, but I think Ruby runtime can
do some jobs lazily.I think we can improve start up time though I’m not sure how big it is.
C:\projects\measurements-git>rci bench core_require_empty
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot™
Client VM 1.7.0_03) [Windows 7-x86-java]
Rehearsal ------------------------------------------------------
core_require_empty 1.939000 0.000000 1.939000 ( 1.901000)
--------------------------------------------- total: 1.939000sec
user system total real
core_require_empty 1.703000 0.000000 1.703000 ( 1.703000)
C:\projects\measurements-git>rci bench core_require_empty
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot™
Server VM 1.7.0_03) [Windows 7-x86-java]
Rehearsal ------------------------------------------------------
core_require_empty 2.468000 0.000000 2.468000 ( 2.393000)
--------------------------------------------- total: 2.468000sec
user system total real
core_require_empty 1.763000 0.000000 1.763000 ( 1.763000)
And how do a few other MRI Rubies perform?..
C:\projects\measurements-git>rci bench core_require_empty
ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-mingw32]
Rehearsal ------------------------------------------------------
core_require_empty 1.311000 8.720000 10.031000 ( 10.053575)
-------------------------------------------- total: 10.031000sec
user system total real
core_require_empty 1.248000 8.752000 10.000000 ( 10.033574)
C:\projects\measurements-git>rci bench core_require_empty
ruby 1.9.3p143 (2012-02-24 revision 34791) [i386-mingw32]
Rehearsal ------------------------------------------------------
core_require_empty 1.014000 5.242000 6.256000 ( 6.390365)
--------------------------------------------- total: 6.256000sec
user system total real
core_require_empty 1.201000 4.945000 6.146000 ( 6.333362)
C:\projects\measurements-git>set RUBYOPT=-rfenix/replace
C:\projects\measurements-git>rci bench core_require_empty
tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32]
Rehearsal ------------------------------------------------------
core_require_empty 0.437000 1.513000 1.950000 ( 1.990114)
--------------------------------------------- total: 1.950000sec
user system total real
core_require_empty 0.546000 1.311000 1.857000 ( 1.980114)
Jon
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums