Why I gave up on JQuery UI's autocomplete
20 October 2010
After "upgrading" I started getting suspicious. Is it actually worse than the old one?
First, about the CSS. If you're not already loading the jQuery CSS you would have to add an extra 21,000 bytes file (which loads 80Kb of images) as opposed to the old
jquery.autocomplete.css which was only 810 bytes.
Secondly, the new jQuery UI Autocomplete plugin didn't support any nice highlighting so you have to write your own and it can quickly get ugly. I wrote one myself and it gets nasty and you have to do your own escaping.
Thirdly, if you just need the autocomplete you'll also need UI core, UI position and UI widget. The minified file weighs in on 19Kb. The packed
jquery.autocomplete.pack.js weighs in on just 8Kb.
Fourthly, speed. The jQuery UI Autocomplete feels more sluggish in loading and rendering. Granted, in my work I often have Firebug switch on but just generally it feels slower when using. Perhaps I've made it extra slow with my hackish attempt to make it highlight.
But... Although the list of options available in the old Autocomplete the number of options available in the new jQuery UI Autocomplete seems pretty nifty too. You mileage will vary. Another benefit of the jQuery UI Autocomplete is that it now seems the more maintained project. I don't see a lot of activity but at least it doesn't say "Deprecated" like it does on the old Autocomplete.