Skip to content
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

Taginfo improvements #3975

Merged
merged 7 commits into from
Apr 20, 2017
Merged

Taginfo improvements #3975

merged 7 commits into from
Apr 20, 2017

Conversation

bhousel
Copy link
Member

@bhousel bhousel commented Apr 19, 2017

for #3955
There is a lot going on here, so I'm rolling several changes into a PR. The goal here is to significantly reduce the number of taginfo lookups that iD is doing, as most of them are unnecessary and they're starting to degrade the server performance.

  • Extend debounce wait time from 100ms to 750 500ms (because touch typists)
  • Blacklist the top 100 keys with the most values from doing value queries for combo boxes (exception: opening_hours)
  • Don't reset the taginfo cache when the user saves to OpenStreetMap. Data doesn't change often enough to need this.
  • We are using debounce wrong. If we don't also debounce the cache lookup, an earlier uncached call will sneak through and get called anyway. (e.g. 1. user types 'name', 2. we have it cached and return results for 'name', 3. debounce asks taginfo for 'nam' anyway)
  • Stop calling taginfo once we get a result with one hit. (e.g. if typing 'vie' returns 'vietnamese' as the only meaningful result, we don't need to also call taginfo for 'viet', 'vietn', etc.)

cc @joto

bhousel added 4 commits April 18, 2017 21:15
The data on taginfo is refreshed once per day, so there's no reason to
reissue those API calls during a normal editing session.

reset() gets called after the user saves their changes to OSM
@runnabot
Copy link

@bhousel bhousel merged commit 3e917f3 into master Apr 20, 2017
@bhousel bhousel deleted the taginfo_improvements branch April 20, 2017 18:49
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

Successfully merging this pull request may close these issues.

2 participants