You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Common mistakes:
a) TRACE_CPUPROFILER_EVENT_SCOPE("Foo") or TRACE_CPUPROFILER_EVENT_SCOPE("FClass::Foo")
--> results in a timer named "Foo" or "FClass::Foo" (the quotes will be included in the name)
b) TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("Foo"))
--> results in a timer named L"Foo" (L and quotes will be included in the name)
c) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(TEXT("Other Foo")) or TRACE_CPUPROFILER_EVENT_SCOPE_TEXT("Foo")
--> Slow! It will use dynamic string matching that adds an unnecessary overhead.
Correct usage:
TRACE_CPUPROFILER_EVENT_SCOPE(Foo)
TRACE_CPUPROFILER_EVENT_SCOPE(FClass::Foo)
TRACE_CPUPROFILER_EVENT_SCOPE_STR("Other Foo") // when timer name has spaces
TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*Foo.ToString()) // only if a dynamic name is really needed
#rb Catalin.Dragoiu
#fyi Marc.Audy, Krzysztof.Narkowicz, Rune.Stubbe, Michal.Valient
[CL 15134822 by ionut matasaru in ue5-main branch]