ruby-on-railsrubyperformancejruby

rails on ruby/jruby performance


I have watched a video that introduce to Jruby and the guy there make a test creating threads and executing the same program on Jruby and Ruby. It was a lot faster on Jruby since on Ruby there are no real threads:

http://railscasts.com/episodes/376-jruby-basics

Could anyone say if this mean that when I am using rails on Jruby my app will be more faster too and will be this a common scenario or just when I am using threads?

Also, as there are same gems for Jruby and ruby, is there any huge difference between them - I mean if in Jruby you can use threads it will be more practical to rewrite the whole gem using them?


Solution

  • Could anyone say if this mean that when I am using rails on Jruby my app will be more faster too and will be this a common scenario or just when I am using threads?

    Yes, your app will be more faster in any scenario and even more now with Java 7 it brings a lot of performance updates. If you’re using JRuby and moving from Java 6 to Java 7 you should see a performance improvement. Remember that your JRuby runs on th JVM.

    Also, as there are same gems for Jruby and ruby, is there any huge difference between them - I mean if in Jruby you can use threads it will be more practical to rewrite the whole gem using them?

    About gems and how they build them I'm not so sure but I think that not everything should be developed using theads even when you could, but thats my opinion.