JQuery AutoComplete vs Gmail AutoComplete

What makes gmail auto-complete much faster than jquery auto-complete?

Every time I enter something into jquery, I need to pause for a few milliseconds a (noticeable) stop before the selection comes out, compare with Gmail, where I don't have to stop typing.

+6
source share
2 answers

Answer from jqueryrocks works for me

$('#selector').autocomplete("option", "delay", 10); 
0
source

Delay higher by default jQuery autocomplete to prevent premature sending of requests to the server (if this is a request for a circuit)

Local data should be instantaneous (unverified, but there is no reason not to)

However, common practice either limits the minimum number of characters or the time delay before querying the database (imagine if you had a large data set and they requested it using j, then jo, then joh, then john) to avoid wasteful query execution

0
source

Source: https://habr.com/ru/post/944001/


All Articles