Repository navigation
Conversation
At the end of the nodes and ways passes, SortedNodeStore/SortedWayStore::finalize publish the "orphan" groups (groups split between worker batches) one after the other: sort, encode, allocate. On the planet that took ~10 s after the ways pass with every other thread idle. The groups are independent and publishGroup is what the workers call concurrently during the pass, so finalize now publishes them from threadNum threads. Same store content. Planet (in memory, 96 threads): the ~10 s single-threaded gap after the ways pass is gone (wall -9 s). Germany output identical. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
cldellow
added a commit
to cldellow/tilemaker
that referenced
this pull request
Nov 8, 2026
relslow-patched: port upstream systemed#989 and systemed#990 (dktue)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gain: planet (in memory, 96 threads) −9 s wall: a ~10 s single-threaded gap after the ways pass is gone. Output identical.
At the end of the nodes and ways passes,
SortedNodeStore::finalizeandSortedWayStore::finalizepublish the "orphan" groups one after the other. Those are the groups split between two worker batches; publishing means sort, encode and allocate. On the planet that took about 10 s after the ways pass, with every other thread idle (perf:SortedWayStore::finalize→publishGroup, malloc, sort,encodeWay).The groups are independent, and
publishGroupis what the worker threads already call concurrently during the pass: atomic counters, a mutex around the allocation list, thread-local scratch, one slot per group. Sofinalizenow publishes them fromthreadNumthreads. The store content is the same, only the order in which groups are published changes.Measurements
Planet in memory, 96 threads, stack of all open performance PRs, 1-second CPU sampling around the end of the ways pass:
Germany and a Chilean fjords extract: output byte-identical (with #981/#942/#983, which make the output deterministic).
🤖 Generated with Claude Code