Yegor Razumovsky
Yegor Razumovsky

Reputation: 912

Rails 3.0.9 in ruby 1.9.3 render partials performance

I have the following hierarchy of partials rendering which results in a table

In prodakshion renedering 5000 rows takes 12 seconds

At the same PC - "Web interface Oracle" draws the same 5000 lines in 2 seconds. That is 6 times faster.

What's the problem? How can i optimize rails performace ?

We are using the slim, but with haml it's the same Working on windows...

Moving partials to helper methods gives me 3x speed!

Upvotes: 2

Views: 578

Answers (1)

Yegor Razumovsky
Yegor Razumovsky

Reputation: 912

here is the problem: small partials are not efficient. Use helpers instead.

When I changed "render small partial" to "call helper method" I got 5x rendering performance.

Sad but true

Upvotes: 4

Related Questions