Architectural question reg acts_as_tree (+ caching?)

hi,
in one view i use a partial to render children and each children renders
the
same partial again and again and again to display a tree. now, the model
utilizes acts_as_tree, the table consists of ~4500 records, but it will
go
higher, final amount estimated to 10k. now my problem is, that it takes
forever to display the site. right now its all in dev-mode, and im still
a
newbie.
so i dont know whether caching would be the best solution here or rather
do
a remote call to pull the children the user wants…
any experience / advise?

thx

I think you’d want to look into a “load on demand” approach…

Why marshal up all the data for all the nodes when most won’t be
visible? I’m assuming you show the subsidiary level(s) collapsed by
default…

Smells like a perfect situation for some AJAX implementation.

I’m not sure caching is the route to go. Caching would probably yield a
much faster response after the initial load, but that is still a lot of
data to push to the client when the client will only be seeing a small
part at any one time.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs