Skip to content

Conversation

@amir16yp
Copy link
Contributor

This PR does two things:

  1. Make a lot of the logic implement parallelism to better utilize multiple CPU cores
  2. Add an option for generating oceans (in elevation-enabled maps only) by providing a shapefile containing polygons of global water bodies. You can download this data from https://osmdata.openstreetmap.de/download/water-polygons-split-4326.zip
IT WORKED

Overall the only thing that is left to do here is benchmark the previous release vs this PR (without oceans), and perhaps later you could implement a way for it to automatically download the shapefile data

@amir16yp
Copy link
Contributor Author

This might break the GUI progress bar, i just noticed this

@amir16yp
Copy link
Contributor Author

image
this makes performance worse apparently

@amir16yp amir16yp marked this pull request as draft November 21, 2025 15:25
@louis-e
Copy link
Owner

louis-e commented Nov 22, 2025

retrigger-benchmark

@github-actions
Copy link

github-actions bot commented Nov 22, 2025

⏱️ Benchmark run finished in 1m 4s
🧠 Peak memory usage: 912 MB

📈 Compared against baseline: 69s
🧮 Delta: -5s
🔢 Commit: 83e9a63

⚠️ This PR worsens generation time.

You can retrigger the benchmark by commenting retrigger-benchmark.

@amir16yp
Copy link
Contributor Author

⏱️ Benchmark run finished in 1m 6s 🧠 Peak memory usage: 934 MB

📈 Compared against baseline: 69s 🧮 Delta: -3s 🔢 Commit: 83e9a63

🟢 Generation time is unchanged.

You can retrigger the benchmark by commenting retrigger-benchmark.

is this good or bad? @louis-e

@louis-e
Copy link
Owner

louis-e commented Nov 22, 2025

Don't worry about the benchmark bot yet, I just reenabled it. But it's good! If the generation time would exceed a certain threshold, it would mention it in its comment.

@amir16yp
Copy link
Contributor Author

⏱️ Benchmark run finished in 1m 29s 🧠 Peak memory usage: 935 MB

📈 Compared against baseline: 69s 🧮 Delta: 20s 🔢 Commit: 83e9a63

🚨 This PR drastically worsens generation time.

You can retrigger the benchmark by commenting retrigger-benchmark.

well shit.
it's the parallelization implementation for sure. the ocean generation wasn't enabled in this benchmark

@amir16yp
Copy link
Contributor Author

i shouldve kept the original implementation of floodfill atp. my problem with it is that when generating oceans is that it would timeout, which causes very little of the actual ocean to be generated (see image)
image

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.

2 participants