arnis icon indicating copy to clipboard operation
arnis copied to clipboard

Multithread?

Open Nishimara opened this issue 2 years ago • 2 comments

Generating big cities is kinda of a hell, because its using only one core. It's stuck on "Calculating layers" while recreating Saint-Petersburg.

Nishimara avatar Oct 23 '22 17:10 Nishimara

Hi there! This is a known issue, big cities can still cause some really big trouble. There's also still a memory bug in some cases. I already put multiprocessing on the ToDo list. There are some problems with that for which I haven't figured out a solution yet, but I'm working on it. The step you mentioned will also be improved by that. In the meantime you can try to minimize the area you want to generate by adding a parameter in the query in src/getData.py, like for example a zip code in case that Saint Petersburg is split up in multiple districts. That would definitely be a little workaround.

Can I ask you how long it took until it reached the Calculating Layers step? I'm impressed that it even got that far haha!

louis-e avatar Oct 26 '22 17:10 louis-e

Thanks for answer. I can't tell how much i waited, but i managed to sleep before it get to calculating layers step.

Nishimara avatar Nov 02 '22 14:11 Nishimara

@louis-e I found a way to optimize this software in a way that generating cities as large as in the picture below is possible. by using memory maps instead of storing in memory, you could generate maps as large as you like. arnis-debug-map I'll send a pull request soon

amir16yp avatar May 20 '24 19:05 amir16yp

Thanks to @amir16yp this issue should be solved now, thus I will close it as completed!

louis-e avatar May 24 '24 17:05 louis-e