Esri / bayview

Help residents explore their local community & government
http://gis.baycountyfl.gov/bayview/
Apache License 2.0
3 stars 3 forks source link

Search can be slow #29

Open clm42 opened 6 years ago

clm42 commented 6 years ago

The search can be very slow and I think its a result of the way it automatically kicks off the search. If it starts searching and you update the search string it re-queries the services but a slow typer might then start the query process several times. The more times it restarts the queries the longer it takes overall to finish it seems though I'm just using the timestamps in Firefox's dev console to test that. Bumping the searchDelay in the search config up to 2000ms from 400ms so it waits longer to query after you stop typing seems to mitigate it but I am not sure how to properly benchmark it.

jgravois commented 6 years ago

I am not sure how to properly benchmark it.

nothing wrong with trusting your gut. (for starters anyway).

i don't see any harm in debouncing requests a little more aggressively the way you describe.

it'd also be worth investigating canceling obsolete requests. we do that in esri-leaflet-geocoder each time another key is pressed.