extract: scan way nodes once across all extracts in complete_ways pass 1#314
Open
yuiseki wants to merge 1 commit intoosmcode:masterfrom
Open
extract: scan way nodes once across all extracts in complete_ways pass 1#314yuiseki wants to merge 1 commit intoosmcode:masterfrom
yuiseki wants to merge 1 commit intoosmcode:masterfrom
Conversation
This was referenced Apr 29, 2026
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.
See #312.
In Pass 1 of
--strategy=complete_ways,eway()is called independently foreach extract on every way. This means
way.nodes()is scanned up to twice perextract, giving up to 2N scans total for N extracts.
This adds an
eway_all()override instrategy_complete_waysthat scansway.nodes()at most twice regardless of N. Auint64_tbitmask tracks whichextracts have claimed the way in the first pass; the second pass then records
all node refs into
extra_node_idsfor matched extracts only.When there are more than 64 extracts the method falls back to the original
per-extract
eway()loop.Benchmark
japan-260423.osm.pbf (~1 GB), 8-tile extraction:
planet-260413.osm.pbf (~86 GB), 16-tile extraction:
Output verified to be identical to the upstream result for all tiles.