-
-
Notifications
You must be signed in to change notification settings - Fork 400
Eliminate copies in deferred cleanup #3035
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
Conversation
72decee
to
5b8a962
Compare
[18341ea] use public dep (+12 squashed commits) [8ce96e4] fix glfw/xcode build [0511a86] cherry-pick 366ebcc [5b8a962] Disable static downcast warnings [c7f4dea] improve type reference [90c6a0b] xcode build [8642002] use `std23::move_only_function` (+6 squashed commits) [e57500aa58] improve coverage, rebase on main [e98eab5cb7] normalize syntax [d8dc4777ca] back out capture changes [29610f6115] clear vector to resume a well-defined state [4ff6f3a4e0] release pending items before waiting [27d1cfacae] Set deferred deletions aside and schedule them once per frame (per source)
3154c34
to
a4d5ede
Compare
Bloaty Results (iOS) 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-3035-compared-to-main.txt |
Bloaty Results 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3035-compared-to-main.txtCompared to d387090 (legacy)
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3035-compared-to-legacy.txt |
Benchmark Results ⚡
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-3035-compared-to-main.txt |
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.
Please see comments.
…to cachly-production * 'main' of https://github.com/maplibre/maplibre-native: (365 commits) Fix warnings, ignore new CMake build directories (maplibre#3356) Fix rare crash LatLngAnimator (maplibre#3352) Release MapLibre iOS 6.12.2 (maplibre#3354) Add logo to sponsor section (maplibre#3353) chore(deps): update bazel (maplibre#3347) Enabled renovate dependency dashboard (maplibre#3350) Change Java Transfrom class from final to normal (maplibre#3332) Made iOS Benchmark app run on Xcode 16 (maplibre#3344) Android 11.8.5 release change log update (maplibre#3342) Fix `ErrorSurfaceLostKHR` exception (maplibre#3337) Add regression test for maplibre#3323, bug in layer dependency tracking (maplibre#3326) Create `core-release.yml` for MapLibre Native Core releases (maplibre#3331) Apply clang-tidy fixes (mostly use designated initializers) (maplibre#3328) Prepare Android v11.8.4 release (maplibre#3324) Add workaround for android emulator as crash on Android emulation is still presented (maplibre#3310) chore(deps): update bazel deps (maplibre#3311) Revert maplibre#3035 which was causing memory growth issue (maplibre#3315) fix glfw platform feature state demo (maplibre#3313) Bump mozilla-actions/sccache-action from 0.0.7 to 0.0.8 in the github-actions group (maplibre#3290) Allow Rust to build core as a static lib (maplibre#3283) ...
Pulls in an implementation of
move_only_function
.This simplifies deferred deletions, since there's no temporary copy to potentially outlast the schedule call, and eliminates the need to transfer ownership from each
unique_ptr
to ashared_ptr
so that it can be copied.Unfortunately, the change of function types for the scheduler spreads to the map callbacks due to usage like:
pathChangeCallback = Scheduler::GetCurrent()->bindOnce(...
This is further complicated by the fact that of the callbacks are explicitly copied:
So some but not all callbacks are changed to the new function type, and typedefs are added to clarify.
This will make it possible to eliminate the extra copy steps in deferred tile destruction.