From: Andreas Schwarz Date: 2004-06-21T07:38:15+09:00 Subject: Re: rubys web performance Florian Weber wrote: > > On Jun 21, 2004, at 0:13 Uhr, Andreas Schwarz wrote: > >> Florian Weber wrote: >>> in general it feels like the compilation of the classes and modules >>> is the bottleneck.. >> >> Of course, but there is a solution: use fastcgi. Try PHP as CGI, it >> will >> be as slow as a ruby CGI. > > not really. like i said, i didnt measure the overhead created by the > fact > that cgi has to start up a interpreter each time. i just stop from the > start > of the script to the end. directly within the script.. > > i just tried something: > > #!/usr/local/bin/ruby > > start = Time.now > require 'yaml' > require 'logger' > t = Time.now - start > > print "Content-type: text/html\r\n\r\n" > print "%.3f sec.\n" % t.to_f > > > this alone takes already at least 0.13 seconds (via cgi) Where's the problem? You have to load the files only once, so it doesn't matter how long it takes to parse them. CGI is no use for "real" applications, use fastcgi, webrick or mod_ruby.