AmpersandJS / ampersand-collection-view

Renders a collection with one view per model within an element in a way that cleans up and unbinds all views when removed.
MIT License
12 stars 8 forks source link

Sorting and `rerenderAll` #41

Open cazzer opened 9 years ago

cazzer commented 9 years ago

Re-rendering the entire collection view is a bit brute force and causes an excessive number of reflows. Fortunately our browsers are fast and it is hard to notice, but large collections have a serious performance impact and meta state (like selected text) is lost between sorts.

Instead of re-rendering all elements it would be extra cool to calculate the new positions and only re-render those which have moved.