Forum: JRuby How could I accelerate the performance for jruby on rails in dev mode?

Posted by Xu Wenhao (xuwenhao)
on 2010-08-26 05:28
(Received via mailing list)
Dear all,

I am currently using jruby on rails for a e-commerce project. When I 
deploy
the project with warbler, put it in a tomcat, the performance is pretty
good.
But if we launch it with dev mode, using jruby script/console, the app 
is
huge slow.
I am wondering if there is a way to accelerate the dev mode server of 
jruby
on rails?

I am using jruby 1.5.1, rails 2.3.8.
Thanks.

Best wishes,
Stanley Xu
Posted by Roger Pack (rogerdpack)
on 2010-08-26 18:25
> I am wondering if there is a way to accelerate the dev mode server of 
> jruby
> on rails?

http://stackoverflow.com/questions/1263664/what-can-i-do-to-speed-up-rails-development-mode/3577196#3577196

might help you.

I assume you mean the load time?

I put my answer on the bottom (use faster_require gem).
GL!
-r
Posted by Xu Wenhao (xuwenhao)
on 2010-08-27 03:13
(Received via mailing list)
Dear Roger,

I didn't mean the server start up time. I mean the time for a request 
from
the web. I am running spree(http://spreecommerce.com) on rails 2.3.8 
with
jruby. When the server just start up, the speed is acceptable, it takes 
1-2
second to handle a request. But when I use that for development and 
debug
for a while, it becomes slowed and slower, sometimes it will take about
30-40 seconds to handle a request.

Is that because in dev mode, it will reload the whole rails framework so 
it
will be very slow?

Thanks.

Best wishes,
Stanley Xu
Posted by Joseph Athman (Guest)
on 2010-08-27 06:15
(Received via mailing list)
You might want to see how much memory your process is using.  Maybe you 
are
getting close to your max heap size and your JVM is doing lots of work
trying to free up memory.  Check out https://visualvm.dev.java.net/ for 
some
really easy to use profiling of your JVM.

Joe
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.