ember-collection icon indicating copy to clipboard operation
ember-collection copied to clipboard

[Question] Are there plans to support a sparse record collection?

Open pixelhandler opened this issue 10 years ago • 4 comments

At a quick scan of the README I see the example that ember-collection will mange rendering 10,000 items and only draw what should be on screen.

My curiosity is… Since I will never ask my API for 10K records, does ember-collection also mange loading records in chucks?

Are there any plans for supporting a sparse array of models? And only load what should be loaded and drawn accordingly?

pixelhandler avatar Sep 09 '15 16:09 pixelhandler

My curiosity is… Since I will never ask my API for 10K records, does ember-collection also mange loading records in chucks?

typically I have accomplished this successfully at a layer above ember-collection.

stefanpenner avatar Sep 09 '15 16:09 stefanpenner

So there is some discussion about it here: https://github.com/emberjs/ember-collection/pull/27 but essentially the idea is send an action when the visible content changes, so you can load more content as needed.

raytiley avatar Sep 09 '15 17:09 raytiley

but essentially the idea is send an action when the visible content changes, so you can load more content as needed.

yes, this sort of protocol i believe is what we we should encourage.

stefanpenner avatar Sep 09 '15 17:09 stefanpenner

Yes, @krisselden has an idea for a datasource API that will facilitate sparse array support.

lukemelia avatar Oct 10 '15 19:10 lukemelia