n8/multi_fetch_fragments — pull request #15 by yoricksijsling (2013-02-19 02:58:35+00:00)
Title: Significant speed increase for large collections

This little loop was causing performance issues for me.

For a collection of 1517 items. With an empty cache, render time was about 1800ms. When the cache was filled, render time was 4000ms! With this change, i brought it down to less than 40ms.

I suspect that the .delete call is the cause of this. The searching and removing of the element is both O(n). This issue might also have been solved by using a Set for the collection, but i haven't tried that.