Skip to content

Search can be slow #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
clm42 opened this issue Dec 6, 2017 · 1 comment
Open

Search can be slow #29

clm42 opened this issue Dec 6, 2017 · 1 comment

Comments

@clm42
Copy link
Contributor

clm42 commented Dec 6, 2017

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
Copy link
Contributor

jgravois commented Dec 7, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants