Hiccups/Stutters when Level Streaming

I made a simple Level streaming setup, specifically a blank level and the SunTemple demo project. When I press a key, the SunTemple is getting streamed in and then shown.

Problem is that with my hardware i7 7700 during streaming there’s a hiccup up to 78ms in the editor and packaged build.

Upon profiling the issue in the editor, we noticed the function StaticDuplicateObject is taking aproximately 100ms ( probably higher value due to profiler ).
Upon profiling in non-editor build, the time is less, about 37ms with most of it in 26ms spent in CPU Stall - Wait for event ( with 27 calls to it ).
Upon profiling in non-editor, first windows run ( when file reads actually read from disk instead of memory) “TickAsyncLoading GT” makes a hic of about 138ms.

Are there any recommendations for minimizing this hiccup besides minimizing the number of actors in the level ?

Further research has led me to believe “TickAsyncLoading GT” is related to the async loading thread and since I activated that through s.AsyncLoadingThread in DefaultEngine.ini now the hiccup of 42ms moved to StartFinalPostprocessSettings->Self

Also, on level unload there is a CollectGarbageInternal which also takes about 25ms. It’s a pretty large number for just 600 actors being deleted.

have you found a solution to this?

Unfortunately no :expressionless:

What’s worse, in our actual game, every 1-3s there’s a 100ms hiccup.
UPDATE: After some research this 100ms issue was due to SkyLight Cubemap captures. Events are almost impossible to debug using the profiler because I never know what event it was :expressionless: ( How to figure out events in the profiler? - Debugging, Optimization, & Profiling - Unreal Engine Forums )

After even more research it seems most hiccups are identifiable using the “stat quick” command. Some of them were related to Global Signed Distance Fields updates which need engine modifications to stop stuttering. Others like DDC_GetSynchronous which execute on a separate thread but seems to be related to hics are still a mystery. I’m starting to believe Unreal has way too many worker threads and hiccups appear in random places, like once it was in UI initialization Slate_CreateScene which was utterly weird because we don’t change the UI when you play the game

1 Like

Hey man I’m 3 years late but I wanted to thank you sharing your solution. Stat quick helped me diagnose the issue I had with stuttering, if you ever see this, you are an angel. Sucks no one tried to help! :frowning_face: