Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Is Ruby slow?
I love Ruby as a language. Its so clean and I love many of the features - code blocks are nice. But when I use it, I have this nagging feeling that it is slow.
When I installed a Ruby on Rails app on my webhost, it was ridiculously slow. If you used regular CGI, there was a 4-5 second time interval between pages loading in the browser. With FastCGI on, it wasn't slow at all.
Now maybe my webhost just didn't have their settings configured very well. Does anyone know if Ruby is slow or if it was just a situational problem that happened to me alone?
When I installed a Ruby on Rails app on my webhost, it was ridiculously slow. If you used regular CGI, there was a 4-5 second time interval between pages loading in the browser. With FastCGI on, it wasn't slow at all.
Now maybe my webhost just didn't have their settings configured very well. Does anyone know if Ruby is slow or if it was just a situational problem that happened to me alone?
0
This discussion has been closed.
Comments
So a Ruby script written by itself wouldn't be slow? Its just the fails factor?
Anyway, reason I ask is because I would like to get away from Rails. I don't like some of the things it forces you into (unless you modify it, which you can do), and I'd like to use Ruby but if it is Ruby itself that is slow compared to say, PHP, then I don't want to use it.
But if it is Rails that is slow, then its not as much of a problem.
Is it Ruby or is it Rails that is slow on CGI? Thanks very much.
mod_ruby for Apache won't perform as well under stress.
CGI is in-between, a bit far from fastCGI though.
In development mode, RoR IS sloooow because it reloads nearly everything from scratch. That's why you can modify any controller, view or model (except the DB itself) without having to reboot Webrick/Apache/lighttpd (and that's a cool feature as long as you are developing your app).
In production mode, there are caches everywhere and you can't modify anymore your code (I think so) and it should scale well.
Just check fastcgi webrick lighttpd under google
like
http://wiki.rubyonrails.com/rails/pages/FAQ#webservers
http://wiki.rubyonrails.com/rails/pages/ProductionEnvironments
http://wiki.rubyonrails.com/rails/pages/LighttpdWithProcessScripts
for more information.
And, no, I don't care for Django, but seriously, the complaint about whitespace in Python is absolutely ridiculous. I've been learning Python recently and I couldn't help but to think "this is what people are complaining about?"
Here is a function in Python:
def function (arg1, arg2):
>>>function contents go here
This is the same function in Ruby:
def function (arg1, arg2)
>>>function contents go here
end
(sorry, couldn't show spaces correctly)
Everyone indents their code. If you aren't, your coding style is unlike that of 99% of people out there. But because Python uses whitespace, your code is cleaner, and you don't even need the unecessary and extra "end" statement like you do in Ruby.
I think its the silliest complaint in all of programming.