meteor/meteor — pull request #969 by jagill (2013-04-20 18:38:54+00:00)
Title: Replacing the insert method in Collection sorting.

Currently, LocalCollection._insertInSortedList uses an insertion-sort type of insertion (which goes like O(n^2). This replaces it a binary search type insertion.

The current method is very non-performant for large collections. An {{#each}} block for a collection of 5000 elements dies incomplete after 15 seconds with the current method (and somethings crashes Firefox). With the binary search change, it renders in 5 seconds.