I came across a call to FlushRenderingCommands() from FGeometryCacheStreamingManager::RemoveGeometryCache while profiling.
Is this planned to be addressed? Or is there some way to avoid this overhead?
[Image Removed]
I came across a call to FlushRenderingCommands() from FGeometryCacheStreamingManager::RemoveGeometryCache while profiling.
Is this planned to be addressed? Or is there some way to avoid this overhead?
[Image Removed]
Steps to Reproduce
Hi,
thanks for reaching out. It seems that the FlushRenderingCommands() change was added in UE 5.3 with this commit to fix a deadlock which was caused by the render thread holding on to some maps. Flushing the render thread makes sure that any in-progress decoding is finished so no maps are held by the render thread.
I’m not sure how to avoid its associated overhead without causing the deadlock behavior, but I can escalate to Epic so someone with more knowledge of the matter can have look.
Could you share some details on how much this flush impacts performance in your project? This can help determine its severity.
Thanks,
Sam
Thanks for getting back. I have reassigned the case to Epic, so someone with more in-depth knowledge can answer your original questions.
Thanks,
Sam
Apologies for the delay. This change was added to avoid a rare deadlock and may not be needed. The way it was found was in by loading and unloading many game instances which is rather uncommon. I’ve created an issue for tracking that should be visible soon here: Unreal Engine Issues and Bug Tracker (UE\-296128)
We use a lot of GeometryCollectionComponents in our streaming world, which I assume is the source of the UGeometryCacheTrackStreamable. I don’t have any data on how frequently we see this spike but it’s typically 30-50ms.
Do you mean GeometryCacheComponents? GeometryCollectionComponents don’t have to do with GeometryCache.
You may be able to revert that change - or put the added FlushRenderingCommands behind a CVar that’s disabled and do some testing. It was a rare crash under uncommon circumstances when it was found and if you stop the playback of the geometry cache before unloading it or the world, forcing the FlushRenderingCommands in RemoveGeometryCache may be unnecessary.
Thanks Sam.
We use a lot of GeometryCollectionComponents in our streaming world, which I assume is the source of the UGeometryCacheTrackStreamable. I don’t have any data on how frequently we see this spike but it’s typically 30-50ms.
Ben