Hello Florian,

FW> hi!

FW> i have to admit that im kinda disappointed by ruby because of its
FW> poor web performance i've experienced so far.

FW> i have a fairly complex application written in php. it does all kinds
FW> of complex stuff, front controller, complex template system, 
FW> interceptors,
FW> etc. even without any kind of acceleration which does any kind of 
FW> caching
FW> for files, classes, etc, the app takes never longer than 0.2 seconds per
FW> request.

FW> when i have a simple app in rails now, which basically only takes about
FW> 100 rows
FW> from one tables, puts it in objects and displays those in the view, the
FW> request
FW> takes 0.2 seconds with mod_ruby (all classes cached!) and with cgi
FW> 0.7 seconds.

FW> on both systems (php and ruby) i measured without the invocation 
FW> overhead.
FW> on the start of the script i set a variable to the current time and and
FW> the end
FW> i displayed the difference of the current time to the variable.

FW> so basically the overhead created by cgi having to start a new ruby
FW> interpreter
FW> each time is ignored.

FW> i know that rails is not really optimized for performance yet, 
FW> especially since
FW> its not even released. however it feels like 0.55 seconds out of the
FW> 0.7 are
FW> spend with the compilation of the ruby classes, before i even execute
FW> any..

I don't know rails but if you work with a non cgi architecture, like
FCGI, webrick, mod_ruby. Write an init page that requires all files
(not just the toplevel ones) that will be loaded.

I don't know if it is possible to change the GC behaviour because GC's
are done much to often in a normal environment, so if this has an
significant percentage, change the settings in "gc.c" and recompile
ruby.



-- 
 Best regards,                        emailto: scholz at scriptolutions dot com
 Lothar Scholz                        http://www.ruby-ide.com
 CTO Scriptolutions                   Ruby, PHP, Python IDE 's