TrackAsyncLoadRequests.Threshhold
TrackAsyncLoadRequests.Threshhold
#Overview
name: TrackAsyncLoadRequests.Threshhold
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Minimum number of hits to include in the report.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of TrackAsyncLoadRequests.Threshhold is to set a minimum threshold for reporting async load requests in Unreal Engine’s asset loading system. It is used to filter out less frequent async load requests from the debugging output, allowing developers to focus on the most significant or frequent requests.
This setting variable is primarily used in the CoreUObject module, specifically within the AsyncPackageLoader system. It is part of Unreal Engine’s asset loading and serialization subsystem.
The value of this variable is set through a console variable (CVar) named CVarTrackAsyncLoadRequests_Threshhold. It is defined as a TAutoConsoleVariable with an initial value of 0, which means by default, all async load requests will be included in the report.
The associated variable CVarTrackAsyncLoadRequests_Threshhold directly interacts with TrackAsyncLoadRequests.Threshhold. They share the same value and purpose.
Developers must be aware that:
- This variable affects the verbosity of async load request tracking.
- Setting a higher threshold will reduce the amount of information in the debugging output, potentially hiding less frequent but still important requests.
- The threshold applies to the number of hits (occurrences) of a particular async load request.
Best practices when using this variable include:
- Start with a low threshold (0 or 1) when investigating async loading issues to get a complete picture.
- Gradually increase the threshold to focus on the most frequent requests if the output is too verbose.
- Use in conjunction with other async loading debugging tools and console variables for a comprehensive analysis.
- Adjust the threshold based on the specific performance characteristics of your game or application.
Regarding the associated variable CVarTrackAsyncLoadRequests_Threshhold:
- It is the actual console variable that controls the threshold value.
- It is used in the DumpRequests and DumpRequestsToFile functions to filter the stack traces based on the set threshold.
- Developers can modify this value at runtime using console commands, allowing for dynamic adjustment of the tracking verbosity.
- When using this variable, ensure to check its current value before analysis, as it may affect the comprehensiveness of the async load request report.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp:380
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarTrackAsyncLoadRequests_Threshhold(
TEXT("TrackAsyncLoadRequests.Threshhold"),
0,
TEXT("Minimum number of hits to include in the report."));
static TAutoConsoleVariable<int32> CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling(
TEXT("TrackAsyncLoadRequests.DumpAfterCsvProfiling"),
1,
#Associated Variable and Callsites
This variable is associated with another variable named CVarTrackAsyncLoadRequests_Threshhold
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp:379
Scope: file
Source code excerpt:
TEXT("Maximum number of stack frame items to keep. This improves aggregation because calls that originate from multiple places but end up in the same place will be accounted together."));
static TAutoConsoleVariable<int32> CVarTrackAsyncLoadRequests_Threshhold(
TEXT("TrackAsyncLoadRequests.Threshhold"),
0,
TEXT("Minimum number of hits to include in the report."));
static TAutoConsoleVariable<int32> CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling(
TEXT("TrackAsyncLoadRequests.DumpAfterCsvProfiling"),
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp:495
Scope (from outer to inner):
file
function void DumpRequests
Source code excerpt:
{
FScopeLock Lock(&CritSec);
StackTracker.DumpStackTraces(CVarTrackAsyncLoadRequests_Threshhold->GetInt(), *GLog);
if (bReset)
{
StackTracker.ResetTracking();
}
}
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp:511
Scope (from outer to inner):
file
function void DumpRequestsToFile
Source code excerpt:
FScopeLock Lock(&CritSec);
StackTracker.DumpStackTraces(CVarTrackAsyncLoadRequests_Threshhold->GetInt(), Out);
if (bReset)
{
StackTracker.ResetTracking();
}
}