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

Optimisation: Don't re-count when fetching Entities #14

Open
hylkevds opened this issue Aug 17, 2020 · 3 comments
Open

Optimisation: Don't re-count when fetching Entities #14

hylkevds opened this issue Aug 17, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@hylkevds
Copy link
Collaborator

First, for each tile a count is requested
Next, if the count is low enough, entities are requested.
Currently, the second request once again contains a $count=true. It's faster to not request the count again.

@TobiasPressler TobiasPressler mentioned this issue Aug 26, 2020
@hylkevds
Copy link
Collaborator Author

One further optimisation would be, that if a higher zoom-level already did a full fetch, no further queries are done.
At the moment, if you zoom in until you see tags, and zoom in further, the tags are reloaded. That is not needed of course.

@TobiasPressler
Copy link
Collaborator

So I would need to store which segment was fetched with wich query. But then I would need to split the segments into smaller segments, to check if it was already fetched in a smaller zoom level. Isn't that to complicated for the library, or should I implement it?

@hylkevds
Copy link
Collaborator Author

Hmm, the semantics of higher and lower zoom level... Is a higher zoom level more zoomed in, or less :)

The key is:

if you zoom in until you see tags, and zoom in further, the tags are reloaded

If I go from zoom level 10 to 11, STAM already has the data for zoom level 10... And if I zoom back out, it already re-use that data. All that is needed is the information which squares of zoom level 11 falls into which square in zoom level 10. Then it can check for zoom level 11, if a square falls into a square of 10 that already has entities loaded.

It's not a high priority, since the further one zooms is, the less data needs to be loaded.

@TobiasPressler TobiasPressler added the enhancement New feature or request label Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants