asrbic / Procedural_Ore_Generator

Other
15 stars 5 forks source link

Added threadpool executor and multithreading on generate #1

Closed idar closed 4 years ago

idar commented 4 years ago

I tried to speed up the application for testing purposes. Using ExecutorService on generate and image writing. Gave me a huge increase in speed. Mins to 13s.

asrbic commented 4 years ago

Thanks for the contribution! Your changes look good and appear to improve the image writing speed a bit as you said. Not quite as dramatic a change on my machine but certainly noticeable. I guess there were previously too many threads fighting for CPU & IO. Tested ingame to be safe too.

I'll re-add the keypress prompt once it's finished after I merge this though. Users found it difficult to see exception messages if the .bat exits on completion.