Look for a solution to the problem caused by large data sets, forcing Ember to block the browser when it tries to process the data.
For pagination, I use the tchak handy pagination mixin to paginate about 13,000+ objects loaded from the API.
Ember Data objects contain an identifier, one text attribute, and several number attributes.
The problem is that it takes about a minute before the browser completes data processing, which makes the browser inaccessible. Firefox even went so far as to warn that the script is using all browser resources and offers to terminate the script.
I wrote my own paginated blink that requests objects by range, i.e. points 10-25, and it works great, with one major limitation: sorting. To sort the data, I need to make additional requests to the server and reload the objects, even if some of them have already been loaded.
I would really like to download all the content up to simplify the sorting process without additional requests to the API. I am looking for guidance to solve this problem, but I am open to a completely alternative approach.
If nothing else, is it possible to reduce the amount of resources on the Ember tab in the browser when it tries to load all 13k objects into the ArrayController?
I am using Ember 1.0.0-pre2 with the latest Ember data (currently in revision 10).
On the backend is Rails 3.2.8.
Update . I got around the problem by loading data into an ArrayController property other than content . This led to a decrease in boot time from a minute to a few seconds. Then I chop the requested number of elements and load them into the content. This works well for any number of elements due to the fact that you cannot easily sort the data.
Marco
source share