TrackAsyncLoadRequests.DumpAfterCsvProfiling

TrackAsyncLoadRequests.DumpAfterCsvProfiling

#Overview

name: TrackAsyncLoadRequests.DumpAfterCsvProfiling

This variable is created as a Console Variable (cvar).

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:

  1. This variable affects performance profiling and debugging output.
  2. 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.
  3. This feature is likely intended for development and debugging purposes, not for use in shipping builds.

Best practices when using this variable include:

  1. Use it judiciously, as frequent dumping of large amounts of data could impact performance.
  2. Ensure that the output files are properly managed and cleaned up to avoid accumulating unnecessary data.
  3. Consider disabling it (set to 0) in shipping builds to prevent potential performance overhead.

Regarding the associated variable CVarTrackAsyncLoadRequests_DumpAfterCsvProfiling:

#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
};