-
-
Couldn't load subscription status.
- Fork 5.4k
Closed
Description
I am having significant performance problems when adding items separately to a sorted collection. This appears to be because a whole-list sort happens every time an item is added. In my case, I cannot roll all of the additions into a single addition operation (which would trigger only one sort).
Performance could be improved by using binary search to find the insertion point (unfortunately not with underscore's sortedIndex, as this does not take a comparator), and inserting the record at the appropriate location instantly.
megawac
Metadata
Metadata
Assignees
Labels
No labels