r.Streaming.OverlapAssetAndLevelTicks

r.Streaming.OverlapAssetAndLevelTicks

#Overview

name: r.Streaming.OverlapAssetAndLevelTicks

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 r.Streaming.OverlapAssetAndLevelTicks is to control the overlapping execution of render asset streaming information updates and level ticking. This setting is part of Unreal Engine’s streaming system, specifically for optimizing performance in rendering and asset management.

This setting variable is primarily used in the Engine’s streaming subsystem, particularly in the StreamingManagerTexture module. It affects how the engine handles the ticking of render asset streaming information and level updates.

The value of this variable is set through a console variable (CVar) named CVarStreamingOverlapAssetAndLevelTicks. It is initialized with a default value of !WITH_EDITOR, meaning it’s enabled by default in non-editor builds.

The associated variable CVarStreamingOverlapAssetAndLevelTicks directly interacts with r.Streaming.OverlapAssetAndLevelTicks. They share the same value and purpose.

Developers must be aware that:

  1. This setting can significantly impact performance, especially on console platforms.
  2. It’s designed to improve performance by allowing render asset streaming info to be processed on a high priority task thread while level ticking occurs on the game thread.
  3. The setting is automatically disabled in the editor for stability reasons.

Best practices when using this variable include:

  1. Testing thoroughly on target platforms to ensure performance gains.
  2. Monitoring for any potential threading issues or race conditions.
  3. Considering disabling this feature if experiencing unexpected behavior in asset streaming or level loading.

Regarding the associated variable CVarStreamingOverlapAssetAndLevelTicks:

When working with either variable, developers should be mindful of the potential performance implications and thoroughly test any changes across different platforms and scenarios.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:41

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarStreamingOverlapAssetAndLevelTicks(
	TEXT("r.Streaming.OverlapAssetAndLevelTicks"),
	!WITH_EDITOR,
	TEXT("Ticks render asset streaming info on a high priority task thread while ticking levels on GT"),
	ECVF_Default);

static TAutoConsoleVariable<int32> CVarStreamingAllowFastForceResident(
	TEXT("r.Streaming.AllowFastForceResident"),

#Associated Variable and Callsites

This variable is associated with another variable named CVarStreamingOverlapAssetAndLevelTicks. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:40

Scope: file

Source code excerpt:

#endif

static TAutoConsoleVariable<int32> CVarStreamingOverlapAssetAndLevelTicks(
	TEXT("r.Streaming.OverlapAssetAndLevelTicks"),
	!WITH_EDITOR,
	TEXT("Ticks render asset streaming info on a high priority task thread while ticking levels on GT"),
	ECVF_Default);

static TAutoConsoleVariable<int32> CVarStreamingAllowFastForceResident(

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:1842

Scope (from outer to inner):

file
function     void FRenderAssetStreamingManager::UpdateResourceStreaming

Source code excerpt:

		//   PS4 Pro - from ~0.55 ms/frame to ~0.15 ms/frame
		//   XB1 X - from ~0.45 ms/frame to ~0.17 ms/frame
		const bool bOverlappedExecution = bUseThreadingForPerf && CVarStreamingOverlapAssetAndLevelTicks.GetValueOnGameThread();
		if (bOverlappedExecution)
		{
			if (StreamingRenderAssetsSyncEvent.IsValid() && StreamingRenderAssetsSyncEvent->IsComplete())
			{
				StreamingRenderAssetsSyncEvent = nullptr;
			}