earwig / bitshift

A semantic search engine for source code
https://bitshift.benkurtovic.com/
MIT License
30 stars 5 forks source link

Rework advanced-search form query live-update. #44

Open sevko opened 10 years ago

sevko commented 10 years ago

Currently, when the user is entering data into the advanced search-form, a loop assembles the full-query represented by the form and checks it for equality with the query already inside the search bar. This approach was taken because the Javascript callbacks for a change in an input[type=text] field's value occasionally failed, and failed to update the query bar, while polling at intervals invariably succeeded.

Another attempt to implement callbacks is necessary, because the looping mechanism in place is both wasteful (queries get regenerated sixty times a second), and bad form.