1. Can Ruby compile its modules to bytecode like Python do? I found in
internet comparision Rails against pythonic application server Quixote. It
is strange, how much, much faster Quixote is. I know that Quixote
precompiles its templates to pure python modules (which are automatic
compiled to pythonic bytecode), so for every request nothing has to be
parsed. Is it also possible for Ruby modules?
If you read further posts from the author of that comparison, you'll realize that he didn't know head from tail doing that "comparison". He was comparing applications with very different setups (clear text vs textile formatted) and it wasn't even about Rails (he used Instiki which is based on similar ideas, but based on a snapshot of how I thought them to be more than a year ago).
Rails caches the compiled ERb and reuses the structure such that a new run merely requires a run on the passed bindings. But there's no explicit byte code caching beyond whatever Ruby itself may be doing.
2. I am testing examples from website of Rails on my WinXP box. I do not
know why, but every request consumes 100% of my CPU and takes several
seconds! I am using simply CGI, but it seems not to be normal even for CGI.
I have the latest Ruby and Rails, 1.5GB RAM and AthlonXP 2800+.
Rails does a bunch of start-up magic that makes CGI whole-fully unsuitable for anything more than asserting that it works. For development, you should get started using WEBrick, which is no race horse but lots faster than CGI, and for deployment you should get on to FastCGI.
Additionally, Rails has different environments for development and production. The development one is generally about 50% slower than the production one.
There's a bunch of high-profile sites running Ruby on Rails. The usual suspects are Basecamp, 43things, Odeo, Ta-da List, and e-commerce sites like Snowdevil and Bellybutton.
All that being said, we're currently just starting the effort to benchmark and profile Rails. We're somewhat through Make It Work and Make It Right. So its the natural progression to Make It Fast.
But unless you both have incredible performance requirements and no money to spend, you should be more than fine. One guy in Texas built a 10-server Rails cluster to serve 1000+ req/sec dynamic requests for his mortgage processing engine, so unless the value of each request is both incredibly low and uncachable, scaling is not a problem.
···
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.loudthinking.com/ -- Broadcasting Brain