[jruby-user] Re: How to build from source?

"Mikhail T." <[email protected]>
Newsgroups gmane.comp.lang.jruby.user
Message-ID <[email protected]>
christian wrote in post #1151838:
> after that you might want to in jruby-launcher gem
>
>      bin/jruby -S gem install jruby-launcher
>
> which gives you a faster startup for jruby command line execution.

I did that, but the script consisting of nothing but "puts 'Hellow
world'" still takes 6 seconds (and plenty of io) to execute:

% time jruby /tmp/hello.rb
Hello world
7.753u 0.777s 0:05.91 144.1%    0+0k 96+80io 0pf+0w

This is on RHEL6 with Oracle's JDK 1.7.0_55.

For comparison, with regular ruby the time is 1 hundredth of a second:
% time ruby /tmp/hello.rb
Hello world
0.007u 0.005s 0:00.01 0.0%      0+0k 0+0io 0pf+0w

I understand, that Java programs do carry the start-up penalty... But I
didn't realize, it is SO big. Am I benefiting from having jruby-launcher
at all -- or do I need to do something else for faster start-ups?
Thanks!

-- 
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.