Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subdivide blocks if needed in Phase::Relations #586

Closed

Conversation

cldellow
Copy link
Contributor

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:
- 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.
@cldellow
Copy link
Contributor Author

This will have conflicts with #590, so I revived it over there in 1f38c9a.

@cldellow cldellow closed this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant