-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Asynchronous GeometryTile deletion #2051
Conversation
Bloaty Results (iOS) 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2051-compared-to-main.txt |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2051 +/- ##
==========================================
- Coverage 58.38% 58.38% -0.01%
==========================================
Files 572 574 +2
Lines 28136 28340 +204
Branches 11270 11376 +106
==========================================
+ Hits 16428 16545 +117
+ Misses 4158 4157 -1
- Partials 7550 7638 +88 ☔ View full report in Codecov by Sentry. |
Bloaty Results 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2051-compared-to-main.txtCompared to d387090 (legacy)
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2051-compared-to-legacy.txt |
Eliminate an unnecessary map key lookup when inserting an existing value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! The android benchmark runs very smooth now.
!benchmark android |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The additional locks in the managers are still a potential performance issue, I think, but I don't feel like we should mess around with it more unless they are observed to be relevant.
I'd prefer to further reduce direct use of the Scheduler
static variables to help make it easier to reason about what can and must be using the same thread pool, but not enough to keep this open.
ok, I think this one is finally ready |
General performance augmentation. Defers destruction of a GeometryTile's mailbox to a worker thread. These tiles hold OpenGL objects which must be deleted on the correct thread, so those objects are deleted on the render thread.
A number of special concerns around synchronization had to be addressed.
The primary performance problem centers around the mailbox needing to take both mutex locks before it can be properly closed. As this was done on the render thread, it would stall the whole renderer when the map was in motion.
This started in #1928 and has since been moved to this development branch.