TrackAsyncLoadRequests.DumpAfterCsvProfiling
TrackAsyncLoadRequests.DumpAfterCsvProfiling
#Overview
name: TrackAsyncLoadRequests.DumpAfterCsvProfiling
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If > 0, dumps tracked async load requests to a file when csv profiling ends.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of TrackAsyncLoadRequests.DumpAfterCsvProfiling is to control the dumping of tracked async load requests to a file when CSV profiling ends in Unreal Engine 5.
This setting variable is primarily used in the CoreUObject module, specifically within the async package loading system. It’s part of the engine’s profiling and debugging capabilities for asynchronous loading operations.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1, meaning it’s enabled by default.
The associated variable CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling directly interacts with TrackAsyncLoadRequests.DumpAfterCsvProfiling. They share the same value and purpose.
Developers should be aware that:
- This variable affects performance profiling and debugging output.
- Setting it to a value greater than 0 will cause the engine to dump tracked async load requests to a file when CSV profiling ends.
- This feature is likely intended for development and debugging purposes, not for use in shipping builds.
Best practices when using this variable include:
- Use it judiciously, as frequent dumping of large amounts of data could impact performance.
- Ensure that the output files are properly managed and cleaned up to avoid accumulating unnecessary data.
- Consider disabling it (set to 0) in shipping builds to prevent potential performance overhead.
Regarding the associated variable CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling:
- It’s an integer console variable that directly controls the behavior described above.
- It’s used in the DumpRequestsAfterCsvProfiling() function to determine whether to dump the requests to a file.
- Developers can modify this variable at runtime through the console, allowing for dynamic control of this debugging feature.
- When working with this variable, ensure that any code depending on it checks its value at the appropriate time, as its value can change during runtime.
#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:385
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling(
TEXT("TrackAsyncLoadRequests.DumpAfterCsvProfiling"),
1,
TEXT("If > 0, dumps tracked async load requests to a file when csv profiling ends."));
struct FTrackAsyncLoadRequests
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp:384
Scope: file
Source code excerpt:
TEXT("Minimum number of hits to include in the report."));
static TAutoConsoleVariable<int32> CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling(
TEXT("TrackAsyncLoadRequests.DumpAfterCsvProfiling"),
1,
TEXT("If > 0, dumps tracked async load requests to a file when csv profiling ends."));
struct FTrackAsyncLoadRequests
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncPackageLoader.cpp:521
Scope (from outer to inner):
file
function void DumpRequestsAfterCsvProfiling
Source code excerpt:
void DumpRequestsAfterCsvProfiling()
{
if (CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling->GetInt() > 0)
{
DumpRequestsToFile(false);
}
}
#endif
};