-
-
Notifications
You must be signed in to change notification settings - Fork 743
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
Short-circuit the rendering of fully transparent symbol tiles. #1757
Short-circuit the rendering of fully transparent symbol tiles. #1757
Conversation
When there are large clusters of colliding symbolic icons and labels, many of them are culled by being set fully transparent but their geometry is still rendered. In some cases, entire tiles full of symbols can be made transparent but are still rendered. This change looks for those fully transparent symbol tiles and avoids rendering them at all which can greatly reduce GL context commands (including draws). For example, for Bing Maps in downtown Seattle at LOD 17 the total number of rendering commands can be reduced by 20-25% with this change.
How would this change affect query render features? |
Bundle size report: Size Change: +57 B
ℹ️ View Details
|
@HarelM: That sounds like a great question... about which I have no clue! So, I'll see if I can find an answer. Thanks. Edit: @HarelM is your question about the impact of this PR on the |
FWIW, the |
The tests may pass if there isn't a test there to simulate this "extreme" condition. |
@HarelM are you referring to the |
Yes, exactly this API. |
This code in this PR waits until nearly the last moment to avoid rendering the fully transparent symbol tiles. It doesn't keep them from being loaded or stored or considered by render queries as far as I can tell. Up to the point of rendering in It looks like there might be one possible place where side-effects could come into play. The early out from |
I would also like to see tests that are making sure this behavior is as expected - both the old behavior and the new one. |
Thanks. Will try to author some unit tests to determine the impact of this PR on |
FWIW, I instrumented the |
…FT/transparent-tile-optimization
…FT/transparent-tile-optimization
…es not affect queryRenderedFeatures results
…FT/transparent-tile-optimization
@HarelM, I added a new map unit test that confirms that the result of |
Thanks for taking the time to review my comments! |
Also there are also the query tests which can be used here as well I guess. |
…transparent tile draw_symbol optimization is triggered.
…ion is triggered by buckets without the hasVisibleVertices flag set.
@HarelM, I removed the test I added to map.test.ts and recreated it (in spirit, at least) as a query test. I also added a simple test to draw_symbol.test.ts to confirm that no rendering occurs for symbol buffers without the |
Last comment before I merge... |
All good now @HarelM ? |
Yes, Thanks! |
When there are large clusters of colliding symbolic icons and labels, many of them are culled by being set fully transparent but their geometry is still rendered. In some cases, entire tiles full of symbols can be made transparent but are still rendered. This change looks for those fully transparent symbol tiles and avoids rendering them at all which can greatly reduce GL context commands (including draws). For example, for Bing Maps in downtown Seattle at LOD 17 the total number of rendering commands can be reduced by 20-25% with this change.
Launch Checklist
CHANGELOG.md
under the## main
section.