brianreavis/selectize.js — pull request #243 by enoshixi (2014-01-09 16:35:16+00:00)
Title: Updated measureString to return 0 for an empty string.

My app was using a lot (100+) of selectize controls on a page and autoGrow / measureString was a significant bottleneck.

An easy fix was to have measureString avoid actually measuring when not necessary (i.e. empty string).

I also keep track of the current width of the input in the autoGrow closure to avoid having to measure the width before updating it, as that was also slowing down initialization.