After enabling Stat UObjects, the overall frame rate drops by 50%. Even if Stat UObjects is disabled, the frame rate fails to recover.
[Attachment Removed]
After enabling Stat UObjects, the overall frame rate drops by 50%. Even if Stat UObjects is disabled, the frame rate fails to recover.
[Attachment Removed]
重现步骤[Attachment Removed]
Hi,
Can you capture and share an Unreal Insight trace showing the performance drop. Can you also tell if this is in a game (I assume Win64) or in the Editor (PIE)?
Regards,
Patrick
[Attachment Removed]
We developed this app on the Android platform.
[Attachment Removed]
Hi,
I’m going on vacation for the Epic winter breaks in few minutes. I was not able to identify the issue but I took a look at the trace and the implementation. It doesn’t seem you toggled the ‘stat objects’ on and off in the trace, so I assume it was enabled when you captured. It obviously that FStats::AdvanceFrameis a bottle neck. I put a screenshot below.
This is in \Engine\Source\Runtime\Core\Private\Stats\Stats2.cpp
void FStats::AdvanceFrame(bool bDiscardCallstack, const FOnAdvanceRenderingThreadStats& AdvanceRenderingThreadStatsDelegate /*= FOnAdvanceRenderingThreadStats()*/)But it waits on a task which is not obvious to identify in 2 minutes. So if you want to identify the bottleneck, you have to identify the task and instrument it. You can start on PC, just adding new scopes. I mean adding extra scope like below, but with different tag names. I suspect this is some bad coding copying tons of data or it just slow and hard to fix… but if you add scopes, you will eventually find what’s going on.
TRACE_CPUPROFILER_EVENT_SCOPE(FStats::AdvanceFrame);Now, if you turn off ‘stat uobjects’ and the performance doesn’t resume, it could be that it takes a couple of frame to clear out, or there it is a bug. Again, if you use Unreal Insights, with the stat on/off, you should see what’s slow and again you can drill down to add new scopes until you figure out what’s slow.
Here your trace. From what I see, the stats system seems to kick a very long task that needs to complete before you can advance. If you still see the same pattern after turning off stat uobjects then identifying the task might tell you what’s going on.
[Image Removed]
Regards,
Patrick
[Attachment Removed]