This is a small quality-of-life tweak for people iterating on a theme on a small extract.
I often test on a Nova Scotia extract. It's big enough to test many things, but small enough to be fast to process, about 25 seconds. 6 seconds are spent in Phase::Relations processing.
The extract has 1,647 blocks, split roughly:
1,500-ish with nodes
140-ish with ways
only 3 with relations
Thus, most of my CPU cores are idle during Phase::Relations, as there are not enough blocks to go around.
This is doubly bad, as a block of relations takes much longer than a block of nodes or ways, due to the more complex geometries involved.
This PR changes Tilemaker such that if it sees the relations phase has too few blocks, it artificially subdivides them in order to keep the CPUs busy.
This reduces my time for Nova Scotia to about 20 seconds.
This is a small quality-of-life tweak for people iterating on a theme on a small extract.
I often test on a Nova Scotia extract. It's big enough to test many things, but small enough to be fast to process, about 25 seconds. 6 seconds are spent in Phase::Relations processing.
The extract has 1,647 blocks, split roughly:
Thus, most of my CPU cores are idle during Phase::Relations, as there are not enough blocks to go around.
This is doubly bad, as a block of relations takes much longer than a block of nodes or ways, due to the more complex geometries involved.
This PR changes Tilemaker such that if it sees the relations phase has too few blocks, it artificially subdivides them in order to keep the CPUs busy.
This reduces my time for Nova Scotia to about 20 seconds.