RITES in JRuby is 20x faster in dev mode, 2x in production

3 views
Skip to first unread message

Stephen Bannasch

unread,
Aug 9, 2009, 7:50:44 PM8/9/09
to cc-dev...@googlegroups.com
I've noticed very long render times for generating the otml for
Investigations when running RITES in dev mode on my computer.

I've got a simple benchmark that turns off caching and generates the
current list of 11 published Investigations:

Development mode: MRI: 849s, JRuby: 35s
Production mode: MRI: 30s, JRuby: 18s

Interesting ...

----------------------------------------

$ jruby -v
jruby 1.4.0dev (ruby 1.8.7p174) (2009-08-09 6586) (Java HotSpot(TM)
Client VM 1.5.0_19) [i386-java]

$ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]

# MRI: script/server -p 3000

$ ruby generate_otml_benchmark.rb

curl -s http://localhost:3000/investigations/107.otml 37.826
curl -s http://localhost:3000/investigations/409.otml 99.964
curl -s http://localhost:3000/investigations/411.otml 128.324
curl -s http://localhost:3000/investigations/412.otml 117.432
curl -s http://localhost:3000/investigations/415.otml 72.455
curl -s http://localhost:3000/investigations/416.otml 74.001
curl -s http://localhost:3000/investigations/510.otml 4.746
curl -s http://localhost:3000/investigations/524.otml 12.370
curl -s http://localhost:3000/investigations/527.otml 99.434
curl -s http://localhost:3000/investigations/534.otml 100.617
curl -s http://localhost:3000/investigations/538.otml 102.151

total elapsed time: 849.320

curl -s http://localhost:3000/investigations/107.otml 42.477
curl -s http://localhost:3000/investigations/409.otml 104.926
curl -s http://localhost:3000/investigations/411.otml 133.660
curl -s http://localhost:3000/investigations/412.otml 123.764
curl -s http://localhost:3000/investigations/415.otml 74.332
curl -s http://localhost:3000/investigations/416.otml 77.687
curl -s http://localhost:3000/investigations/510.otml 4.923
curl -s http://localhost:3000/investigations/524.otml 12.681
curl -s http://localhost:3000/investigations/527.otml 102.446
curl -s http://localhost:3000/investigations/534.otml 103.213
curl -s http://localhost:3000/investigations/538.otml 105.779

total elapsed time: 885.889

# MRI: script/server -p 3000 -e production

$ ruby generate_otml_benchmark.rb

curl -s http://localhost:3000/investigations/107.otml 8.748
curl -s http://localhost:3000/investigations/409.otml 2.707
curl -s http://localhost:3000/investigations/411.otml 3.283
curl -s http://localhost:3000/investigations/412.otml 2.899
curl -s http://localhost:3000/investigations/415.otml 1.817
curl -s http://localhost:3000/investigations/416.otml 1.882
curl -s http://localhost:3000/investigations/510.otml 0.212
curl -s http://localhost:3000/investigations/524.otml 0.446
curl -s http://localhost:3000/investigations/527.otml 2.796
curl -s http://localhost:3000/investigations/534.otml 2.747
curl -s http://localhost:3000/investigations/538.otml 2.456

total elapsed time: 29.993

curl -s http://localhost:3000/investigations/107.otml 8.228
curl -s http://localhost:3000/investigations/409.otml 2.569
curl -s http://localhost:3000/investigations/411.otml 3.235
curl -s http://localhost:3000/investigations/412.otml 3.080
curl -s http://localhost:3000/investigations/415.otml 1.686
curl -s http://localhost:3000/investigations/416.otml 1.849
curl -s http://localhost:3000/investigations/510.otml 0.216
curl -s http://localhost:3000/investigations/524.otml 0.991
curl -s http://localhost:3000/investigations/527.otml 2.877
curl -s http://localhost:3000/investigations/534.otml 2.933
curl -s http://localhost:3000/investigations/538.otml 2.481

total elapsed time: 30.146

# JRuby: script/server -p 3000

$ ruby generate_otml_benchmark.rb

curl -s http://localhost:3000/investigations/107.otml 4.083
curl -s http://localhost:3000/investigations/409.otml 4.321
curl -s http://localhost:3000/investigations/411.otml 5.248
curl -s http://localhost:3000/investigations/412.otml 3.941
curl -s http://localhost:3000/investigations/415.otml 3.675
curl -s http://localhost:3000/investigations/416.otml 3.021
curl -s http://localhost:3000/investigations/510.otml 1.290
curl -s http://localhost:3000/investigations/524.otml 1.575
curl -s http://localhost:3000/investigations/527.otml 4.018
curl -s http://localhost:3000/investigations/534.otml 3.693
curl -s http://localhost:3000/investigations/538.otml 3.410

total elapsed time: 38.274

curl -s http://localhost:3000/investigations/107.otml 2.604
curl -s http://localhost:3000/investigations/409.otml 4.326
curl -s http://localhost:3000/investigations/411.otml 3.910
curl -s http://localhost:3000/investigations/412.otml 3.733
curl -s http://localhost:3000/investigations/415.otml 2.879
curl -s http://localhost:3000/investigations/416.otml 2.802
curl -s http://localhost:3000/investigations/510.otml 1.299
curl -s http://localhost:3000/investigations/524.otml 1.625
curl -s http://localhost:3000/investigations/527.otml 3.781
curl -s http://localhost:3000/investigations/534.otml 3.698
curl -s http://localhost:3000/investigations/538.otml 4.064

total elapsed time: 34.721

# JRuby: script/server -p 3000 -e production

$ ruby generate_otml_benchmark.rb

curl -s http://localhost:3000/investigations/107.otml 3.735
curl -s http://localhost:3000/investigations/409.otml 2.750
curl -s http://localhost:3000/investigations/411.otml 2.992
curl -s http://localhost:3000/investigations/412.otml 2.440
curl -s http://localhost:3000/investigations/415.otml 1.658
curl -s http://localhost:3000/investigations/416.otml 1.630
curl -s http://localhost:3000/investigations/510.otml 0.281
curl -s http://localhost:3000/investigations/524.otml 0.360
curl -s http://localhost:3000/investigations/527.otml 3.528
curl -s http://localhost:3000/investigations/534.otml 2.148
curl -s http://localhost:3000/investigations/538.otml 1.876

total elapsed time: 23.399

curl -s http://localhost:3000/investigations/107.otml 1.088
curl -s http://localhost:3000/investigations/409.otml 1.929
curl -s http://localhost:3000/investigations/411.otml 2.407
curl -s http://localhost:3000/investigations/412.otml 2.277
curl -s http://localhost:3000/investigations/415.otml 1.435
curl -s http://localhost:3000/investigations/416.otml 1.495
curl -s http://localhost:3000/investigations/510.otml 0.277
curl -s http://localhost:3000/investigations/524.otml 1.009
curl -s http://localhost:3000/investigations/527.otml 2.049
curl -s http://localhost:3000/investigations/534.otml 1.978
curl -s http://localhost:3000/investigations/538.otml 1.829

total elapsed time: 17.773


Reply all
Reply to author
Forward
0 new messages