While working on my mod Farseer I have been looking into ways to optimize the "generation" of regions outside the player's view distance. At the moment I use the PeekChunkColumn() function of IWorldManagerAPI. I do this for every single chunk in one region at a time, so 256 chunks at once. It's quite slow! Looking at the engine internals, it seems like the chunk peeking feature has a lot of overhead; every peeked chunk generates an entirely new region map, chunk map and so on. It's nice that it can be configured to stop at a specific worldgen pass (I set it to stop at Terrain) but really I would also like to be able to stop even eariler, as I don't need it to generate caves, strata and so on, that's just wasted processing power.
I did some experiments with basically "stealing" some of the deeper engine code for chunk peeking and doing it for an entire region at once in a big two-dimensional loop. The performance improvement is drastical, maybe 5-10x faster than before. However, due to my lack of understanding of how the chunk gen engine works, it also completely breaks when "normal" chunks are generated at the same time as these "peeked" chunks, likely because of multithreading issues, I would guess my custom peek thread and the normal worldgen thread use some shared data that then gets corrupted.
So my humble request, a "PeekChunkColumn" but for an entire region at once. Or something like that, maybe more control of the worldgen systems as a modder? It seems they are very tightly coupled and hard to access without doing Harmony patches..
Now, this is a very specific use case, and a bit rambly, so I don't expect this to happen tomorrow or anything, just putting it out there