[RAILS] way too slow

Oh, I bet there is. My "killer app" is Iowa because of the development ease
and speed advantage it gives me.

Rails and Iowa, while having different architectures, have a lot of overlap
in the problems that they solve, so I have no doubt that programming with
Rails imparts a boost to development speed.

Kirk Haines

···

On Fri, 20 Aug 2004 08:44:41 +0900, Lothar Scholz wrote

I think we must compare our ruby solutions with existing web
frameworks in perl or python. And they have some really good
solutions like Mason or Webware out there. And i really doubt that
you can get a real development speed advantage with RAILS.

Random thought: auto-reload.rb from the mod_ruby distribution. Does
that work with Rails, or does the two not like each other?

I should get some Rails up and running soon..

···

On Fri, Aug 20, 2004 at 02:21:14AM +0900, David Heinemeier Hansson wrote:

>I'm not necessarily looking for the best benchmarks, but I would
>expect better than 1 req/sec.

Are you running in CGI mode? If so, 1 req/sec is similar to what I'm
getting. Rails does a ton of fancy, smancy stuff at startup to get all
the magic poofing.

In a production environment, though, this initialization cost is never
seen by the users as it only happens once when a new Apache or FCGI
process starts up.

So I wouldn't get my hopes up for that to improve. I find 1 req/sec
perfectly acceptable for developing on my Powerbook offline. I
developed the new release of Basecamp like that.

But even if it is a problem for you, it's pretty easy to switch between
FCGI and CGI. So just use CGI when you're changing stuff all the time
(like working on a single page), then use FCGI (or mod_ruby) when you
need to test a bunch of pages.

--
Thomas
beast@system-tnt.dk

Florian Weber wrote:

like david already said, that requests can take up to one second using
cgi is totally normal. ruby has to parse tons of classes for every execution
with that. i have to admit that i was also surprised by that at first. especially
when you compare it to php. but then again most of the php libs are c..

Hmm, that makes me wonder if part of the rails framework could be set up as some C extensions...

Hello Kirk,

Rails and Iowa, while having different architectures, have a lot of overlap
in the problems that they solve, so I have no doubt that programming with
Rails imparts a boost to development speed.

Compared to what ?

Every other solution on this planet ? I only looked at the Rails
webpage and i must say that the differences between for example
Webware and rails are more a matter of style and personal preference.

···

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

Random thought: auto-reload.rb from the mod_ruby distribution. Does
that work with Rails, or does the two not like each other?

They're not too fond of each other. It won't reload the requires of your requires, so it basically doesn't work for changing the model. You'll have to restart Apache when doing that.

···

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

If profiling indicates it, you might look into rubyinline ... really a
nice way to get those c extensions in quickly and easily.

-pate

···

On Fri, 20 Aug 2004, David Morton wrote:

Florian Weber wrote:

> like david already said, that requests can take up to one second using
> cgi is totally normal. ruby has to parse tons of classes for every
> execution
> with that. i have to admit that i was also surprised by that at first.
> especially
> when you compare it to php. but then again most of the php libs are c..

Hmm, that makes me wonder if part of the rails framework could be set up
as some C extensions...

like david already said, that requests can take up to one second using
cgi is totally normal. ruby has to parse tons of classes for every execution
with that. i have to admit that i was also surprised by that at first. especially
when you compare it to php. but then again most of the php libs are c..

Hmm, that makes me wonder if part of the rails framework could be set up as some C extensions...

no. that would be such a waste of time. i also meant the ruby standard library and
not rails.

like i said though, use unit/function tests.. then you shouldnt have to
reload pages with every small change anyways..

"Premature optimization is the root of all evil."
     -- Sir Charles Anthony Richard Hoare

···

On Fri, 20 Aug 2004 06:06:30 +0900, David Morton <mortonda@dgrmm.net> wrote:

Florian Weber wrote:

> like david already said, that requests can take up to one second using
> cgi is totally normal. ruby has to parse tons of classes for every
> execution
> with that. i have to admit that i was also surprised by that at first.
> especially
> when you compare it to php. but then again most of the php libs are c..

Hmm, that makes me wonder if part of the rails framework could be set up
as some C extensions...

Every other solution on this planet ? I only looked at the Rails
webpage and i must say that the differences between for example
Webware and rails are more a matter of style and personal preference.

It might be on the application server side of things (stuff like request handling, sessions), but you can't quite compare ActiveRecord to MiddleKit.

Compared to my years of working in the Perl world doing web work.

Kirk Haines

···

On Fri, 20 Aug 2004 10:13:57 +0900, Lothar Scholz wrote

Hello Kirk,

> Rails and Iowa, while having different architectures, have a lot
of overlap KH> in the problems that they solve, so I have no doubt
that programming with KH> Rails imparts a boost to development speed.

Compared to what ?

quite honestly i think only looking at the webpage and the examples doesnt
show enough to judge if it speeds up development or not. give it a try =)

quite honestly i still dont understand how somebody could say rails is 'unusable'.
how many apps are out there which cant do caching and at the same time
have thousands of requests at the same time? if you are building amazon2 rails
might just not be the right thing for you. but then again, then you might have the
money to make it not matter anymore if there are 1 or 50 servers =)

that doesnt mean though that rails' performance wont improve. it will..

···

On Aug 20, 2004, at 3:13 Uhr, Lothar Scholz wrote:

Hello Kirk,

> Rails and Iowa, while having different architectures, have a lot of overlap
> in the problems that they solve, so I have no doubt that programming with
> Rails imparts a boost to development speed.

Compared to what ?

Every other solution on this planet ? I only looked at the Rails
webpage and i must say that the differences between for example

Hmm? What version did you try? I'm looking at the one from mod_ruby
1.2.0 and it seems to spend a lot of effort on tracking what files
depend on which, in order to being able to reload the right stuff..

But my source-reading-fu isn't that strong, so whether it actually
works...

···

On Fri, Aug 20, 2004 at 04:03:47AM +0900, David Heinemeier Hansson wrote:

>Random thought: auto-reload.rb from the mod_ruby distribution. Does
>that work with Rails, or does the two not like each other?

They're not too fond of each other. It won't reload the requires of
your requires, so it basically doesn't work for changing the model.
You'll have to restart Apache when doing that.

--
Thomas
beast@system-tnt.dk

I too am using webrick and it is much faster than 1 request per second
even in autoload mode.

···

On Fri, 20 Aug 2004 04:03:47 +0900, David Heinemeier Hansson <david@loudthinking.com> wrote:

> Random thought: auto-reload.rb from the mod_ruby distribution. Does
> that work with Rails, or does the two not like each other?

They're not too fond of each other. It won't reload the requires of
your requires, so it basically doesn't work for changing the model.
You'll have to restart Apache when doing that.

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

Carl Youngblood wrote:

I too am using webrick and it is much faster than 1 request per second
even in autoload mode.

How doe one specify auto-reload in WEBrick?

Thanks,

James

How doe one specify auto-reload in WEBrick?

It's not a WEBrick feature, but a feature for the WEBrick adapter in Rails. If you start it with "ruby dispatch.servlet -a", you'll be running in auto-reload mode.

···

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services