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

Don't pre-resolve and index complex locationSets into GeoJSON #9347

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

bhousel
Copy link
Member

@bhousel bhousel commented Oct 28, 2022

Don't pre-resolve and index complex locationSets into GeoJSON.
This was taking a lot of time at app startup.

Instad now we resolve and index only the include and exclude parts. We can still determine the valid locationSets at runtime in locationSetsAt() by checking the _locationIncludedIn and _locationExcludedIn caches.

This also upgrades the locationManger to an ES6 class.

This also includes some hacky code in nsi.js so that the NSI will continue to work. The NSI matcher can build its own location index, but it doesn't need to do this. We monkeypatch a few of the matcher collections to work with the new LocationManager.

related:
osmlab/name-suggestion-index#7101 (comment)
facebook/Rapid#297

cc @mbrzakovic, we were just discussing this.

This was taking a lot of time at app startup.

Instad now we resolve and index only the include and exclude parts.
We can still determine the valid locationSets at runtime in `locationSetsAt()`
by checking the `_locationIncludedIn` and `_locationExcludedIn` caches.

This also upgrades the locationManger to an ES6 class.

This also includes some hacky code in nsi.js so that the NSI will continue to work.
The NSI matcher can build its own location index, but it doesn't need to do this.
We monkeypatch a few of the matcher collections to work with the new LocationManager.
@tyrasd tyrasd added the performance Optimizing for speed and efficiency label Oct 28, 2022
@tyrasd tyrasd merged commit 56c05b1 into develop Oct 28, 2022
@tyrasd tyrasd deleted the locationmanager_perf branch October 31, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Optimizing for speed and efficiency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants