Hacker News new | ask | show | jobs
by msftie 749 days ago
I’m poking around while on an airplane, so the network speed is pretty slow. The site crawls to a stop with each character I type into the search box. As a performance booster, perhaps consider adding a short delay before firing off queries to update the results or decoupling the the search box from the query result?
2 comments

Ah, unstable connections! It's good that you've noticed me of this performance matter. I'm going to look for improving this issue.
Crazy idea: provide a search box, and when the user hits "enter", POST the data to the backend, which queries the database, and then returns the relevant results.
It's possible to make autosuggest performant on poor Internet connections, it just needs a little more thought put into optimizing for it:

1. Debounce!

2. Use WebSockets to minimize unnecessary round trips

3. Cache previous results and use them when the input is a superstring of a previous input (e.g. results for "Android mobile dev" will always be a subset of the results for "mobile dev")

Crazy straightforward
Retro.