systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.44k stars 229 forks source link

clear UsedWays sooner #572

Closed cldellow closed 10 months ago

cldellow commented 10 months ago

This is only a small improvement.

Previously, the memory for UsedWays is freed after all phases. This PR changes it to be freed before the final phase. For non-renumbered PBFs, UsedWays takes up 256MB, so giving that back is somewhat meaningful.

It may not make a practical difference in being able to process a larger PBF--I haven't dug too much into the memory use of the Relations phase to know if it uses much incremental memory.

This PR also removes the ReadPhase::All phase, which seems to be unused. I'm not sure if it's still in the code as a useful debugging thing, so please correct me if removing it was bad.

cldellow commented 10 months ago

This seems like relatively small beer, given that it's a fixed cost, and if you really care about memory, you'll be using --compact, so closing.