Improving render performance

Hi

I’m running RoR 0.14.1 (Ruby 1.8.2, MySQL 3.23.52) under Freebsd 4.11 on
a PII/400. I’ve got a relatively simple blog-style app with comments and
tags which seems to be rendering very slowly. There’s no advanced
trickery in the templates and I’m preloading associations but
performance is still lacking when using WEBrick production mode.

Completed in 0.85013 (1 reqs/sec) | Rendering: 0.66203 (77%) | DB:
0.10784 (12%) | 200 OK

The render time is always > 0.5 seconds for a ~25kb page, including
subsequent requests.

Where should I be looking for performance gains? I’ve tried profiling
the object constructors but, as expected, there’s no enormous
time-consumers there. Can I profile the rendering code somehow to work
out what’s going on?

Perhaps this old machine just doesn’t have the grunt it needs.

Cheers,

On Nov 11, 2005, at 3:17 AM, Mark Drayton wrote:

Completed in 0.85013 (1 reqs/sec) | Rendering: 0.66203 (77%) | DB:
Perhaps this old machine just doesn’t have the grunt it needs.

Cheers,

Mark Drayton

Mark-

Yeah I think your machine is just underpowered for rails. You can

use a lot of caches_page and fragment caching and see if that can
speed things up for you. Also lighttpd is very light on resources and
is faster than webrick so you may want to give that a try.

Good Luck-
-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
[email protected]
509-577-7732

Mark Drayton wrote:

Cheers,

Unfortunately there are no good profilers available for Linux at the
moment, there’s only one tool for Windows, which is very good too. But
with your hardware it won’t be much fun using it.

My best bet is that you have a lot of link_to with hash arguments in it.
If you plan to stay on such a poor machine, you could code these as
tags directly. I’ll blog about this problem over the weekend.

– stefan

http://railsexpress.de/blog