# Anyone noticed slow rendering performance with formhelpers?

**URL:** <https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521>\
**Category:** Rails\
**Created:** [April 4, 2006, 12:16pm UTC](https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521 "2006-04-04T12:16:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [April 4, 2006, 12:16pm UTC](https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521/1 "2006-04-04T12:16:59Z")

</div>

It seems like the form helpers, such as “link\_to” and “check\_box” really  
slows down rendering when you have hundreds of rows.

Has anyone else noticed this?? Is there a way to go around it apart  
from typing the raw html?

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [April 4, 2006, 12:30pm UTC](https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521/2 "2006-04-04T12:30:05Z")

</div>

Chris wrote:

> It seems like the form helpers, such as “link\_to” and “check\_box” really  
> slows down rendering when you have hundreds of rows.
> 
> Has anyone else noticed this?? Is there a way to go around it apart  
> from typing the raw html?

I doubt it. Use pagination or caching I would say.

Jeroen

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [April 4, 2006, 12:45pm UTC](https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521/3 "2006-04-04T12:45:34Z")

</div>

I am writing an app that tracks online stories (and this is my first  
rails app).

The main Story table has an id, title and description field (plus  
others). The stories have prequels and sequels. What is the best  
way of storing the sequel and prequel data as it references the one  
main Story table.

I was thinking about putting in a parent\_id column that would look  
like this :

## id title parent\_id

1 A Phantom Menace NULL  
2 Attack Of The Clones 1  
3 Revenge Of The Sith 2  
4 A New Hope 3  
5 Empire Srikes Back 4  
6 Return Of The Jedi 5  
7 Terminator NULL  
8 Terminator 2 7  
9 Terminator 3 8  
etc  
etc

1/ Is this the best way to store this sort of data?

Note : My UI would consist of a list and the user would drag the  
stories into the order (top to bottom using ajax magic) and then the  
data would be saved to the DB.

Once in the DB how would I go about extracting it out (say if I was  
wanting to edit A New Hope in the example above). I would want the  
model to produce the list of stories in order if I was editing item 4  
for example.

Any suggestions or pointers on tackling this problem.

Thanks,

Rob

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [April 4, 2006, 2:12pm UTC](https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521/4 "2006-04-04T14:12:13Z")

</div>

sounds like acts\_as\_tree

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [April 4, 2006, 2:27pm UTC](https://www.ruby-forum.com/t/anyone-noticed-slow-rendering-performance-with-formhelpers/93521/5 "2006-04-04T14:27:48Z")

</div>

certainly does. am learning about it now.

thanks
