ivaynberg/select2 — pull request #2848 by tedliang (2014-12-09 06:21:35+00:00)
Title: Fix performance issue with setVal on MultiSelect

As suggested in https://github.com/ivaynberg/select2/issues/781#issuecomment-30935226, significantly improves selection performance (90~100x faster) on a list of 2,000 items.

Also see: https://github.com/ivaynberg/select2/issues/905 and https://github.com/ivaynberg/select2/issues/2706

It will take 1s to 'select all' in http://jsfiddle.net/hrro7j6L/3/ and 93s in http://jsfiddle.net/hrro7j6L/4/