When typing in the search box, ever key press fires off a new API call. Typically waiting 300 to 500 ms before firing off the search is the best way to handle auto-complete. This will drastically reduce API calls to search, which are expensive, and help with the UX, since you won't have search results coming in at different times.
When typing in the search box, ever key press fires off a new API call. Typically waiting 300 to 500 ms before firing off the search is the best way to handle auto-complete. This will drastically reduce API calls to search, which are expensive, and help with the UX, since you won't have search results coming in at different times.