MinedMap
MinedMap copied to clipboard
Multithreading support
Very simple, but working region rendering parallelism, driven by ctpl library.
Renderer took number of cores by std::threads::hardware_concurrency()
and creates thread pool.
Speed of big worlds rendering dramatically increased
What do you think about this thing? (Bump)
I'd like to have a command line argument for the number of threads, defaulting to 1. I'm running Minecraft and MinedMap on the same hardware, and MinedMap usually
- only regenerates very few tiles, making updates finish quickly -> multi-threading is not that useful
- has low priority, so using more than one core is undesirable
The multi-threading feature is very useful for the initial run or full regeneration of the map after MinedMap updates though, so I'm generally in favor of merging this.
Also, one actual issue: the thread pool must be finished before makeMipmaps
is called, as makeMipmaps
uses the generated images as input.
In a second step, multi-threading should be added for makeMipmaps
as well.
I'm use MinedMap on 30-40gb map and update took around a minute, multithreading makes in much faster.
OK, will see what I can do with mipmaps!