You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extract --strategy=complete_ways is slow with multi-extract configs on large files #312
The config file defines 16 bounding boxes covering the full planet at z=2 Web Mercator tile boundaries.
What did you expect to happen?
I expected the runtime not to be dominated by avoidable I/O stalls.
What did happen instead?
Strategy
Elapsed
complete_ways
51m 36s
simple
31m 27s
During Pass 2, disk utilisation reached 100% while CPU was mostly idle, suggesting the main thread was spending much of its time blocked waiting for writes to complete.
What did you do to try analyzing the problem?
I identified two likely causes:
Synchronous write flushing.Extract::write() calls osmium::io::Writer synchronously each time its buffer fills, blocking the main thread while the write is performed.
Redundant way node scanning in Pass 1.Pass1::eway() is called independently for each extract on every way, causing way.nodes() to be scanned multiple times per way.
I implemented fixes for both in my fork and measured on the same planet file and config:
Version
Elapsed
vs baseline
upstream
51m 36s
—
patched
41m 18s
-20%
I plan to submit a pull request. Mentioning here first in case the approach raises concerns.
Activity