Autocomplete on a dataset of 80,000 words using Webworkers, jquery's Deferred/Promise api and trie data structure

This browser doesn't support Web Workers. Please try out this demo in Chrome or FF.

This sample leverages HTML5 webworkers api to build and query an internal trie data structure (for faster lookups) on a large dataset of 80K+ words. jQuery's deferred/promise api comes in handy to coordinate the callbacks from the worker thread. Browser stays super responsive even when constantly querying against a large dataset.

Source: http://github.com/guptag/AutoComplete

Please check out the following articles(link1, link2) from John Resig's blog before using Tries in javascript. While the blog didn't discuss the performance impact in the context of webworkers, it provides valuable insight on how to measure the performance/memory impact.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eu arcu tortor. Suspendisse velit quam, faucibus eu viverra elementum, convallis non erat. Duis faucibus augue et dolor tincidunt cursus. Aliquam erat volutpat. Phasellus venenatis, sapien id aliquet egestas, leo enim vehicula sapien, sed facilisis ligula magna vel arcu. Suspendisse ultricies malesuada vestibulum. Aliquam eu leo in nisi aliquam mollis. Praesent convallis mauris at justo faucibus viverra. Vivamus pharetra nunc vel dui accumsan at molestie nisl ultricies. Donec et convallis lacus. Cras blandit suscipit nulla, posuere porta risus ultricies nec. Cras a erat nec nisi cursus congue. Donec non quam ac orci pellentesque semper eu a quam. Fusce nisl nulla, auctor at ultrices sit amet, accumsan molestie elit. Praesent vehicula lorem sed lorem iaculis a cursus nunc auctor. Aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tristique diam non ligula euismod lobortis. Donec sed facilisis est. Ut eget lacinia justo. Vivamus ac mauris arcu, sit amet volutpat orci. Praesent sapien nulla, aliquam vitae tristique sit amet, mattis nec odio. Ut sed tempor lectus. Nunc sit amet ante ac purus auctor commodo in sit amet mi. Aenean vel semper turpis. Integer pulvinar, orci eleifend rutrum viverra, ligula elit varius leo, sit amet auctor metus tortor non justo. Vestibulum aliquam sodales arcu vitae ornare. Morbi commodo accumsan nibh, fringilla sagittis est molestie sit amet. Sed vulputate, odio sed imperdiet condimentum, eros diam pulvinar lacus, vitae mattis nisl arcu vel libero. Mauris nec purus quis turpis vehicula convallis vitae a lorem. Pellentesque feugiat augue ut elit posuere congue. Proin gravida elit quis purus facilisis a facilisis libero dictum. Aliquam gravida enim sem. Nam magna sapien, aliquam non cursus scelerisque, facilisis ut turpis. Etiam nec eros vitae dui euismod accumsan. Suspendisse malesuada commodo vulputate.