You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
I've got a page where I need to display all elements in a table, and it just takes forever to load, partly because it issues a separate query to retrieve each node's children. I imagine it would go much faster to load all the rows at once, and then associate them based on their parent_ids. This, of course, isn't a good solution if you need to load only 10% of a large table, and there's no way to determine which rows need to be loaded without checking for parent_ids one query at a time.
To solve that it might be a good idea to setup something like "eager-loading sets" where you could tag each instance with a set name, so you could eager load a named set... or something.
But for starters, just eager loading the whole table would be awesome.
The text was updated successfully, but these errors were encountered:
Yes, right now to display the tree, I'm getting n+1 queries through the whole tree. I've tried using some preload hacks for datamapper but can't seem to get it working. Is there a work around to load all the elements with their "tree" attributes intact?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've got a page where I need to display all elements in a table, and it just takes forever to load, partly because it issues a separate query to retrieve each node's children. I imagine it would go much faster to load all the rows at once, and then associate them based on their parent_ids. This, of course, isn't a good solution if you need to load only 10% of a large table, and there's no way to determine which rows need to be loaded without checking for parent_ids one query at a time.
To solve that it might be a good idea to setup something like "eager-loading sets" where you could tag each instance with a set name, so you could eager load a named set... or something.
But for starters, just eager loading the whole table would be awesome.
The text was updated successfully, but these errors were encountered: