bDisableDeferredIndexing

bDisableDeferredIndexing

#Overview

name: bDisableDeferredIndexing

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 9 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bDisableDeferredIndexing is to control the behavior of Blueprint search metadata indexing in Unreal Engine’s Find-in-Blueprint feature. This setting variable is primarily used in the Blueprint search system, which is part of the Unreal Engine’s editor functionality.

The bDisableDeferredIndexing variable is mainly used in the FFindInBlueprintSearchManager class, which is part of the Kismet module in the Unreal Engine editor. This module handles various Blueprint-related editor functionalities, including searching within Blueprints.

The value of this variable is set during the initialization of the FFindInBlueprintSearchManager. It is read from the GEditorIni configuration file under the “BlueprintSearchSettings” section.

This variable interacts with other related variables such as bDisableThreadedIndexing and bIsCachingDiscoveredAssets. These variables collectively control the indexing behavior of the Blueprint search system.

Developers must be aware that setting bDisableDeferredIndexing to true will cause the search metadata to be regenerated for loaded assets on the main thread immediately at discovery or load time. This can potentially cause performance hitches, especially in projects with many Blueprints.

Best practices when using this variable include:

  1. Keeping it false (default) for most development scenarios to avoid performance issues.
  2. Only enabling it when immediate indexing is absolutely necessary and the performance impact is acceptable.
  3. Consider the interaction with other related variables (like bDisableThreadedIndexing) when modifying this setting.
  4. Be cautious when enabling this in large projects with many Blueprints, as it could significantly impact editor performance.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditor.ini:538, section: [BlueprintSearchSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2040

Scope (from outer to inner):

file
function     FFindInBlueprintSearchManager::FFindInBlueprintSearchManager

Source code excerpt:

	, bHasFirstSearchOccurred(false)
	, bEnableGatheringData(true)
	, bDisableDeferredIndexing(false)
	, bEnableCSVStatsProfiling(false)
	, bEnableDeveloperMenuTools(false)
	, bDisableSearchResultTemplates(false)
	, bDisableImmediateAssetDiscovery(false)
{
	for (int32 TabIdx = 0; TabIdx < UE_ARRAY_COUNT(GlobalFindResultsTabIDs); TabIdx++)

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2080

Scope (from outer to inner):

file
function     void FFindInBlueprintSearchManager::Initialize

Source code excerpt:

	// Init configuration
	GConfig->GetInt(TEXT("BlueprintSearchSettings"), TEXT("AsyncTaskBatchSize"), AsyncTaskBatchSize, GEditorIni);
	GConfig->GetBool(TEXT("BlueprintSearchSettings"), TEXT("bDisableDeferredIndexing"), bDisableDeferredIndexing, GEditorIni);
	GConfig->GetBool(TEXT("BlueprintSearchSettings"), TEXT("bDisableThreadedIndexing"), bDisableThreadedIndexing, GEditorIni);
	GConfig->GetBool(TEXT("BlueprintSearchSettings"), TEXT("bEnableCsvStatsProfiling"), bEnableCSVStatsProfiling, GEditorIni);
	GConfig->GetBool(TEXT("BlueprintSearchSettings"), TEXT("bEnableDeveloperMenuTools"), bEnableDeveloperMenuTools, GEditorIni);
	GConfig->GetBool(TEXT("BlueprintSearchSettings"), TEXT("bDisableSearchResultTemplates"), bDisableSearchResultTemplates, GEditorIni);
	GConfig->GetBool(TEXT("BlueprintSearchSettings"), TEXT("bDisableImmediateAssetDiscovery"), bDisableImmediateAssetDiscovery, GEditorIni);

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2351

Scope (from outer to inner):

file
function     void FFindInBlueprintSearchManager::ExtractUnloadedFiBData

Source code excerpt:


	// In these modes, or if there is no tag data, no additional indexing work is deferred for unloaded assets.
	if (!bDisableDeferredIndexing && !bDisableThreadedIndexing && NewSearchData.HasEncodedValue())
	{
		// Add it to the list of assets that require a full index rebuild from the metadata. This work will not block the main thread and is decoupled from the search thread.
		PendingAssets.Add(NewSearchData.AssetPath);
	}
	else
	{

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2653

Scope (from outer to inner):

file
function     void FFindInBlueprintSearchManager::AddOrUpdateBlueprintSearchMetadata

Source code excerpt:


		// During unindexed/out-of-date caching we will arrive here as a result of loading the asset, so don't remove the IsUnindexedCacheInProgress() check!
		if (bForceRecache || bClearCachedValue || IsUnindexedCacheInProgress() || bDisableDeferredIndexing)
		{
			// Cannot successfully gather most searchable data if there is no SkeletonGeneratedClass, so don't try, leave it as whatever it was last set to
			if (!bClearCachedValue && InBlueprint->SkeletonGeneratedClass != nullptr)
			{
				using namespace BlueprintSearchMetaDataHelpers;

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2667

Scope (from outer to inner):

file
function     void FFindInBlueprintSearchManager::AddOrUpdateBlueprintSearchMetadata

Source code excerpt:

			// a) Deferred or multithreaded indexing is disabled. In these cases, indexing will be handled by the search thread.
			// b) There is no generated metadata. In this case, there's nothing to search, so there's no need to index the asset.
			if (bDisableDeferredIndexing || bDisableThreadedIndexing || SearchData.Value.Len() == 0)
			{
				// Mark it as having been indexed (it's now searchable).
				SearchData.StateFlags |= ESearchDataStateFlags::IsIndexed;

				// Remove it from the list of pending assets (if it exists).
				PendingAssets.Remove(AssetPath);

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2681

Scope (from outer to inner):

file
function     void FFindInBlueprintSearchManager::AddOrUpdateBlueprintSearchMetadata

Source code excerpt:

			}
		}
		else if (!bDisableDeferredIndexing)
		{
			// Add it to the list of assets to be indexed (deferred)
			PendingAssets.Add(AssetPath);
		}

		// Copy new/updated search data into the cache

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:2872

Scope (from outer to inner):

file
function     bool FFindInBlueprintSearchManager::ContinueSearchQuery

Source code excerpt:

	{
		// In these modes, the full index may not have been parsed yet. We'll do that now on the search thread.
		if (bDisableDeferredIndexing || bDisableThreadedIndexing)
		{
			// Must lock this behind a critical section to ensure that no other thread is accessing it at the same time
			FScopeLock Lock(&SafeModifyCacheCriticalSection);

			// Grab the latest entry from the cache. In the case of parallel global searches, one of the other threads may have already updated it while we were blocked by the mutex above.
			SearchData = GetSearchDataForAssetPath(SearchData.AssetPath);

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/FindInBlueprintManager.cpp:3223

Scope (from outer to inner):

file
function     void FFindInBlueprintSearchManager::CacheAllAssets

Source code excerpt:

			{
				// During the initial asset discovery and registration stage, we'll index an unknown number of assets in the background as a continuous caching operation.
				bIsCachingDiscoveredAssets = !bDisableDeferredIndexing && bIsAssetDiscoveryInProgress;
			}

			if (bIsCachingDiscoveredAssets)
			{
				CacheParams.OpFlags |= EFiBCacheOpFlags::IsCachingDiscoveredAssets;

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Public/FindInBlueprintManager.h:883

Scope (from outer to inner):

file
class        class FFindInBlueprintSearchManager : public FTickableEditorObject

Source code excerpt:


	/** If true, search metadata will be regenerated for loaded assets on the main thread immediately at discovery or load time. By default, this work is deferred to avoid hitching. */
	bool bDisableDeferredIndexing;

	/** If true, and if deferred indexing is not disabled, search metadata will be regenerated for loaded assets on the main thread at a rate of one asset per tick. Additional indexing
		work will be deferred to the search thread. By default, all indexing work is deferred to a background thread and both loaded and unloaded assets are fully indexed asynchronously. */
	bool bDisableThreadedIndexing;

	/** Whether CSV profiling has been enabled (default=false) */