improve the perfromance of the javascript autocomplete lookup

Benjamin Mako Hill || Want to submit a patch?