-
Notifications
You must be signed in to change notification settings - Fork 46
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
unnecessary spinner display on re-zoom with cached tiles #780
Comments
Thanks for the issue. The title was not very clear. I added one. does that capture the essence of this issue? |
There is definitely caching for |
The reason I ask is that I am not sure how we could check whether or not a tile is in the geotiff cache. If deck.gl does not think the tile is loaded, but geotiff has cached it, I think there is likely no way for us to easily check if something is in the geotiff cache. |
We use tiff |
Thanks for reply. Is it possible to expand cache size somehow? |
Maybe "unnecessary layers loading on re-zoom with cached tiles" ? |
Hey guys, can it be a solution? https://deck.gl/docs/api-reference/geo-layers/tile-layer. I mean configurable maxCacheSize. The issue persists also in their sandbox example - if to zoom the map in and out it is not saved in cache |
@vadzimvashchanka Yes, I think if you expanded the deck.gl cache size, that could help with the issue. You could also maybe debounce the spinner or something similar so that it only starts after 500ms (during which time the deck.gl cache hopefully catches up with geotiff cache). |
Describe the bug
Hey everyone. We faced this issue a year ago after adding Spinner that indicates slide tile loading during requests to the api and everything works fine except one moment: when user tries to zoom in and zoom out to the same place Spinner appears for half a second and disappears(there are no requests to the backend during this loading) but it looks pretty bad and we are looking for a way of solving this issue. We guess that VIV uses kind of cache under the hood where it stores loaded tiles and clear as soon as it overflows. Function that check if all layers are loaded(if true we show spinner):
deckRef?.current?.deck.props.layers .flatMap((lay) => lay) .every(({ isLoaded }) => isLoaded);
Is it possible to prevent slide loading if user zoom in and out to the same place?
Is it possible to understand that viv sent request to the backend to get new tile so we were able to show spinner only during requests?
To Reproduce
zoom in and out in the same place
Expected behavior
No layers loading because they have been already loaded
Screenshots
Small video that demonstrates the issue:
Screen.Recording.2024-03-07.at.18.54.22.mov
Environment:
@hms-dbmi/viv: 0.13.8
@deck.gl/core: ~8.8.20
Google Chrome
Version 122.0.6261.69 arm64
The text was updated successfully, but these errors were encountered: