Forum: Ruby on Rails Anyone noticed slow rendering performance with formhelpers?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris (Guest)
on 2006-04-04 14:16
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?
Jeroen H. (Guest)
on 2006-04-04 14:30
(Received via mailing list)
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
Robert Z. (Guest)
on 2006-04-04 14:45
(Received via mailing list)
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
Chris H. (Guest)
on 2006-04-04 16:12
(Received via mailing list)
sounds like acts_as_tree
Robert Z. (Guest)
on 2006-04-04 16:27
(Received via mailing list)
certainly does.  am learning about it now.

thanks
This topic is locked and can not be replied to.