Forum: JRuby slow startup time

Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2014-06-06 07:07
Just in case you were wondering, the time to do a "rake build" on one of
my projects, in ruby:

real  0m0.667s


jruby:

real  0m26.153s

Might be nice to get some attention on this sometime.
Cheers!
-roger-
https://github.com/rdp/sane was what I was building, FWIW.
8db112f19ce0a69c7e490bbf27256346?d=identicon&s=25 Tobias Pfeiffer (Guest)
on 2014-06-06 09:11
(Received via mailing list)
Hi there,

That is a known jruby problem as it needs to spin up a JVM. Your tume
seems
a bit too much though...

Have you had a look at this wiki?
https://github.com/jruby/jruby/wiki/Improving-startup-time

Cheers,
Tobi

sent from my mobile - sorry for the brevity
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2014-06-06 17:01
(Received via mailing list)
I am seeing 14s locally but I am obviously not using your machine and
this
seems pretty damned slow.  I wonder if this is exposing some bottleneck?

Roger, you are also on Windows too right?  Do you know which version of
Java you are using?

-Tom
C37cb1a6a19e23f067aae6ccb2d0de4b?d=identicon&s=25 Manuel Ramos Caro (Guest)
on 2014-06-06 20:34
(Received via mailing list)
Hi,

There's also some tips as Tom said you need to consider hardware, system
and the JVM tune...but i think that you never could get the performance
of Ruby on JRuby... because you have the JVM between OS and JRuby... I
think that if you need something that requiere extends or use some Java
on Ruby its your choise but on other cases normal RMI will work better
for you...

I'm using JRuby because GUI development on RMI its a little chaos and it
gave me accesing to Java GUI classes and easy portability at running.

If that's not your case and your are using it for web development
without any Java ... you will get better performance using simple RMI
but on other case you need to tune your JVM, Server, System, Os, etc...

Manuel Ramos programming on JRuby for fun...

http://sourceforge.net/projects/rmldonkey/


Reggards



El 06/06/14 09:10, Tobias Pfeiffer escribi??:
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2014-06-10 16:18
Thomas E Enebo wrote in post #1149053:
> I am seeing 14s locally but I am obviously not using your machine and
> this
> seems pretty damned slow.  I wonder if this is exposing some bottleneck?
>
> Roger, you are also on Windows too right?  Do you know which version of
> Java you are using?

I think that was Linux...

I retimed it on OS X for reference

jruby:

$ time ruby -v
0m0.218s

$ time rake -T
0m14.284s

$ time rake build
0m27.557s

ruby  2.1.1
$ time rake build
0m0.880s

FWIW :)
-roger-

jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit
Server VM 1.6.0_65-b14-462-10M4609 [darwin-x86_64]
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2014-06-10 16:19
Manuel Ramos Caro wrote in post #1149077:
> Hi,
>
> There's also some tips as Tom said you need to consider hardware, system
> and the JVM tune...but i think that you never could get the performance
> of Ruby on JRuby... because you have the JVM between OS and JRuby... I
> think that if you need something that requiere extends or use some Java
> on Ruby its your choise but on other cases normal RMI will work better
> for you...
>
> I'm using JRuby because GUI development on RMI its a little chaos and it
> gave me accesing to Java GUI classes and easy portability at running.

Yeah that's why I use jruby too--the easy cross platform GUI! :)

I was trying to avoid having to use tricks like drip...

-roger-
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2014-06-10 16:45
(Received via mailing list)
Roger, the other big killer of startup time is sub-process invocation.
You
might want to see if jeweler is spawning and perhaps
-Xinproc.enabled=true.  The earlier mention for startup flags can also
make
a huge difference.

-Tom
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.