Thread: Ruby is slow?

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2006
    Posts
    69
    Rep Power
    8

    Ruby is slow?


    Hi, All

    Our company has database system, one of it's interface was designed by ruby and java, another is designed by PHP. The function was same. but I found ruby system is much slow than php's in internet speed. they process the totally same thing.

    Is that true and why?

    Thanks
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2007
    Location
    Rest Aria
    Posts
    1
    Rep Power
    0
    I guess the major problem is Ruby's interpretter.
    But, don't forget that Ruby 'motto' has been Ruby is fast enough for most tasks, and when its not, you can recode the hotspots in C. :-P


    ps.You could try Python. It's also object oriented and it's faster (as fast as PHP, i believe).
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2005
    Posts
    301
    Rep Power
    0
    according to this tutorial
    What would you think if I told you that you could develop a web application at least ten times faster with Rails than you could with a typical Java framework? You can--without making any sacrifices in the quality of your application!
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    24
    It would highly depend on your setup. If your using ruby through cgi then your killing yourself in startup speed. While most of the time php is installed by building itself into the httpd server or creating a socket to a running app, such as fastcgi. Which is by far faster.

    There are tools such as fastcgi or even mod_ruby, if your using apache, to make ruby much faster.

    Ruby is a fairly fast language, not as fast as must scheme implantations by any means. However it can get must jobs done. If put into the right framework it can run pretty smoothly.
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    Tampa, Florida
    Posts
    31
    Rep Power
    12
    Slower is possible, but Ruby is fast enough in the vast majority of cases to run a web site. The key thing is that you can't base it on a development box.

    As an example, running Rails via Mongrel has very respectable performance. How much it's going to compare to PHP, Python, or Perl is going to depend on the equality of the servers as well as whether or not all of the systems involved are running ORM's.

    In short, just make sure the playing field is even before doing the comparisons.

IMN logo majestic logo threadwatch logo seochat tools logo