overviewer/Minecraft-Overviewer — pull request #1115 by gregoire-astruc (2014-06-15 17:32:13+00:00)
Title: Parallel texture generation, simpler 'dispatcher', in-memory caching for tilesets

Hello,

I enjoy the quality of the tiles produced, but I noticed something odd on my server: I have to nice the process by a huge factor to still be able to use it, and it looks like the process deadlocks often (I have to kill it and relaunch by hand).

So, I browsed through the code, and I did a couple adjustements:
- I tweaked how textures are registered: block, billboard and sprite are now class-based decorators which inherits the material decorator. I am working towards a system in which people will be able to register block without modifying the project's sources. I saw the issues on that matter, but since many of us using mods are stuck with 1.6.x, it's worth my while :)

- I disregarded the dispatcher entirely and used something a lot simpler based on synchronized queues (courtesy of python multiprocessing): since you have to generate work items at level N before processing work items at level N-1, the items are queued in that order with synchronization before going up a level. It also should avoid the deadlocks I'm seeing :)

- I used your LRUCache for tiling processing: generated images are added to the cache, so it avoids hitting the filesystem on compositetile generation. I don't not if there's a big gain here, but it was bothering me.

Hopefully you'll find some of the modifications useful. I did some of them kind of quick, so I'm open for discussion, refactoring and creating a proper PR branch afterwards.

Thanks again for your product,

Greg*