There seems to be a big problem when using the SpawnSplineMesh node in the PCG enviroment.
The issue is as it seems to be with how the SplineMeshComponent is being gotten in 5.5 compared to 5.7.
in 5.7 version at every frame of the generation it runs GetOrCreateManagedSplineMeshComponent which in turn
runs get component once at the beginning, the next frame it runs again and now it runs get component 2 times.
This trend continues through the whole generation so at the end it runs GetComponent on SplineMeshComponent
once for each splinemesh created earlier, this makes pcg slow down considerably and in turn the next piece takes
even longer to generate.
This version is non blocking and the editor continues running.
Now if we swap over to 5.5 instead when the generation now runs GetOrCreateManagedSplineMeshComponent there
is no get component as far as i could see from the profiler and instead it uses a previously cached SplineMeshComponent. This is
what i think makes this version in general way faster because its consistant across generation.
This version is blocking so the editor can not be used which is good if you generate a random level like what
we need and to make it as fast as possible.
The end goal is to make the 5.7 version blocking in the generation so that the road can generate really fast
while a loading screen is up.
Please see attached image of the profiler. Behavior is similar in editor and packaged project.
If there is just a setting or a flag that has been missed to make it blocking that would be amazing to know about.
The attached repro projects are clean default projects that will show the issue when compared. Please note that we tested 5.6 as well and it seems to behave the same as 5.7.
Thank you
Traces.zip(151 MB)