Hello
I have tried to run my string munching application in JRuby, and I am
quite pleased with the results.
My string_arrays.each{|array| m=MunchedStrings.new; array.each{|str|
m.munch str}; puts m.pretty_print } cycle tops at about 790MB ram, and
the RSS even decreases when smaller arrays are processed. In contrast,
the MRI tops at about 2.5G at the end of the cycle, and I have
observed no decrease in RSS ever. Also notable is that after parsing
the data file JRuby uses about 250MB ram as opposed 600MB used by MRI.
These results were obtained with JRuby 1.1RC2 on OS X 10.4 with the
included Sun JVM 1.5 versus current Debian ruby MRI packages
(1.8.6).
I did not check for differences in the result yet, and I could not run
the jruby tests as the junit.jar is not included, at least not in the
place indicated by readme.
The JRuby 1.0 that is packaged for Debian does not work for me. It
does not understand -KU and spams lots of warnings about $; being
uninitialized.
I know that it would be nice to provide the application for testing
but I cannot release the data.
I might to do a simplified version that runs on random data eventually.
Anyway, other people who have trouble with large memory usage might
try JRuby as well. It runs 1.8 code without modification (I
intentionally did not use any non-core extension to make the
application portable although it might have simplified the use of
utf-8 strings a bit).
Thanks
Michal