I'm making an app that can search Metacritic (screen-scraper app). In the search box, I have an autocomplete function, which essentially does exactly what pressing "Search" would do, which is query Metacritic and populate a listview with the results. The problem is, since the app is a screen-scraping tool, it is not instant on autocomplete like Google.
Since the autocomplete is fired on keyup (every time the value of the text field changes essentially), since it is slow, when the user finishes typing, it updates the listview a bunch of times as it keeps searching, so it keeps changing which is quite annoying as it fetches the next results. Is there a good way to get around this?
I was thinking having it only query every other keypress, so that it wouldn't update as much and therefore wouldn't be as blinky.
This fix isn't necessarily perfect, but it helps a tremendous amount. What I did was:
a) Not fire the query until the length of the text field is at least 3 b) Fire every other keypress
This removed most of the blinking.