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

Cancel pending image loading when tile is out-of-view #730

Open
Zaitsev opened this issue Oct 25, 2019 · 2 comments
Open

Cancel pending image loading when tile is out-of-view #730

Zaitsev opened this issue Oct 25, 2019 · 2 comments
Labels

Comments

@Zaitsev
Copy link

Zaitsev commented Oct 25, 2019

TANGRAM VERSION:

All

ENVIRONMENT:

All

TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:

set network throttling to somethin slow
Start fast pan and zoom , fly-to,
Look at network connections

RESULT:
Tiles that moved out of view still loading, This causing huge network queue and as a result tiles that requested last (most recent and in view) loaded after tiles that does not required for scene rendering, also blocking some interactions
EXPECTED RESULT:

not in the view network requests should be canceled (see mapbox for examples)

@bcamper
Copy link
Member

bcamper commented Oct 30, 2019

Thanks for reporting, this is an interesting case. We do have tile cancellation logic, but it turns out that the way tiles are loaded in Tangram, it only works for vector tiles (you can see this in network inspector if you rapidly zoom, for instance).

The reason it doesn't work for raster tiles has to do with how they are implemented in Tangram -- raster tiles are just textures stretched over a simple square tile polygon, and textures are loaded with an entirely different process. Unfortunately, because of the order of operations in that process, and need to communicate the texture load/create process between worker and main threads (WebGL resources can only be allocated on the main thread, and this is part of the texture creation process), there is currently no easy "hook" I can use to add this cancellation.

But it's a good bug to fix, and I am thinking about how we can achieve it.

@bcamper bcamper added the bug label Oct 30, 2019
@Zaitsev
Copy link
Author

Zaitsev commented Apr 12, 2021

Any plans about this?

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

No branches or pull requests

2 participants