Procedural Foliage Spawner - Extreme iteration time issues, looking for suggestions on how to fix.

Hello guys,

I’ve been using the Procedural Foliage Spawner recently and I noticed the iteration time isn’t really there yet. If you resimulate a PFS it can go on for hours before you can use the editor again. Looking at the code, the spawner seems to finish in a few seconds over a number of worker threads and then proceeds to the main thread where it spends its time by calling FFoliageMeshInfo::AddInstance() a million or so times, effectively freezing the editor until its done.

I know there are a few comments in there suggesting a refactor is going to happen “soon” but that could be whenever. I’d like to get my hands dirty!

So I’ll take a look at this tomorrow. Meanwhile, has anyone looked at this before and can share any pointers? What exactly is taking so long?

Any pointers, thoughts etc are much appreciated!