4 ms·
Ok, now the user has to press enter for a request to be initiated. The reason that the script issues a recursive call is that I want the user to see the sugges
by codeismightier 18y ago
Ok, now the user has to press enter for a request to be initiated.
The reason that the script issues a recursive call is that I want the user to see the suggestions right away and check the status later since the DNS requests can take a while.
- kwamenum86 18y agoAre you caching the results on your server? You should cache the results for a better response time. That way you can return more information to the browser without checking availability for the same queries over and over. For example, save the availability of picklenickel.com for 24 hours (or maybe more I don't know). Then you can do some recursive calls using cached data. Making all those concurrent HTTP requests seems impractical and has to be affecting your server's responsiveness.
- codeismightier 18y agoI am running a local resolver (bind9), so I would assume that it is being cached.
- kwamenum86 18y agoHmm. It's strange the initial requests usually take 20+ s but the subsequent recursive requests take ~200 ms each. Maybe a bottleneck in the code?
- ojbyrne 18y agoI can't actually see the site yet, so I'm totally guessing, but a better way to do ajax autocomplete type things is to use SetTimeout or SetInterval to poll, rather than onKeyDown.