From: Sarah Tanembaum Date: 2004-12-02T05:12:46+09:00 Subject: Re: Rails with webrick slow as snails David Heinemeier Hansson wrote: >> BUT >> >> 1. when starting the webrick from the command line, IT'S SLOW AS SNAIL >> 2. when pointing to the http://localhost:3000/hello/index, IT SLOW AS >> SNAIL AS WELL. It takes at least 4 minutes to get the result. >> >> What am I doing wrong? > > > What kind of hardware are you running on? 4 minutes sound insane in any > case, though. > > The reloading WEBrick dispatcher is indeed dog slow in 0.8.5 (around ~1 > second per reload on my G4 1.5ghz). This is being greatly remedied in > the forthcoming 0.9.0 that's already available as beta gems right now. > > The new approach uses a two-tiered approach to requiring classes where > your app is reloaded on every request, but the framework remains cached > and the interpreter is reused. This is much, much more efficient and > hence much faster. > > One guy reported going from 10s per page load to much less than a second > on his G3 400mhz Mac. > > So if you don't find out what's screwing up your current installation, > you might want to try out the beta gems. They can be fetched with: > > gem update -s http://gems.rubyonrails.org > > For convenience, there's even an executable start_server command in the > root of new apps created with 0.9. Click that and the WEBrick server > starts. > -- > David Heinemeier Hansson, > http://www.basecamphq.com/ -- Web-based Project Management > http://www.rubyonrails.org/ -- Web-application framework for Ruby > http://macromates.com/ -- TextMate: Code and markup editor (OS X) > http://www.loudthinking.com/ -- Broadcasting Brain > > > Hi David, I'm running PIII/800MHz laptop. Perhaps I did exagerate a bit, but not much. It takes at least 3 minutes for the sample page to come up and it will take just as long to reload/refresh the same page. Plus, starting up the "ruby dispatch.servlet -a" takes at least 1 minutes. I will try what you suggested by updating it to the latest beta. Thanks