Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6
-
Fix Version/s: JRuby 1.6RC3
-
Component/s: Embedding
-
Labels:None
-
Environment:OS: Ubuntu Maverick 64 bits; Java: Java HotSpot(TM) 64-Bit Server VM (build 20.0-b06, mixed mode)
-
Testcase included:yes
-
Number of attachments :
Description
This a serious performance regression. startup time to launch the exact same small JRuby program (see how to donwload it below)
- along with jruby-complete 1.5.6: 12 seconds
- along with jruby-complete trunk: 45 seconds!
(trunk is from today, GIT id 254d3d0cde5b27eba920ff26b08b5adf68f9ab5e )
The part of the program I'm testing here does something very simple in that test: basically, it's just the standard jruby-complete.jar executable with the following modifications:
- there is some 4 custom extra gems bundled in jruby.home
- the Main class is changed in to that class: https://github.com/rvalyi/terminatooor/blob/master/src/com/akretion/OOORConsole.java
which basically only launch the standard IRB swing console.
The IRB Swing console start script has been modified a bit however in our case to pre-require our custom gems and possible custom extensions:
https://github.com/rvalyi/terminatooor/blob/master/src/com/akretion/kettle/steps/terminatooor/ui/jirb_swing.rb
There is absolutely no code logic involved here from the 'ooor' bundled gem so just don't bother about what it does.
testing it:
here is the exectable jar in both configurations:
- jruby-complete 1.5.6: http://akretion.s3.amazonaws.com/code/jruby-ooor-1.5.6.jar
- jruby-complete trunk: http://akretion.s3.amazonaws.com/code/jruby-ooor-trunk.jar
just test the startup time by doing:
java -jar jruby-ooor-xxx.jar
I'm pretty sure this regression occurs those last 3/4 weeks as I remembered I tested it and it wasn't that slow.
If that is of any help here is how the jar is assembled: https://github.com/rvalyi/terminatooor (build.xml and 'ant' task)
Hope this helps. Don't hesitate if you have question, I'm aslo rvalyi on twitter for fast feedback.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Charles Oliver Nutter [ headius ] |
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Fix Version/s | JRuby 1.6RC3 [ 17147 ] | |
| Resolution | Fixed [ 1 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Guys,
I did some further testing:
the slowness really all comes from the require "ooor" statement line 17 of https://github.com/rvalyi/terminatooor/blob/master/src/com/akretion/kettle/steps/terminatooor/ui/jirb_swing.rb
I changed a bit that part of the code of that file into:
puts Time.now()
require 'rubygems'
puts Time.now()
require 'active_resource'
puts Time.now()
require 'ooor'
puts Time.now()
This gives me:
rvalyi@rvalyi-laptop:~/DEV/terminatooor/terminatooor$ java -jar jruby-ooor.jar
Sat Feb 12 16:57:36 -0200 2011
Sat Feb 12 16:57:37 -0200 2011
Sat Feb 12 16:57:38 -0200 2011
Sat Feb 12 16:58:17 -0200 2011 (require 'ooor' was the slow part)
I also tried to change a bit the ooor.gemspec to see if I was doing something wrong, but nothing improved the performance.
One reason require "activeresource" is fast might be because activeresource uses autoload while ooor doesn't. Well may be.
Still, I can tell you that if you take that same ooor gem and but it in your JRuby gems, if you try to require 'ooor' in jirb directly instead, well, it's just normally fast.
So the differences I see here is that our gems are in a jar and may be the fact that we passed through the JSR223 though I doubt it the reason of the slowness.