Change Content loading threads count to depend on logical cores count instead of physical (set limit to 12)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "Engine/Core/Config.h"
|
||||
|
||||
// Amount of content loading threads per single physical CPU core
|
||||
#define LOADING_THREAD_PER_PHYSICAL_CORE 0.5f
|
||||
#define LOADING_THREAD_PER_LOGICAL_CORE 0.5f
|
||||
|
||||
// Enable/disable additional assets metadata verification, note: we should disable it for release builds
|
||||
#define ASSETS_LOADING_EXTRA_VERIFICATION (BUILD_DEBUG || USE_EDITOR)
|
||||
|
||||
@@ -165,7 +165,7 @@ bool ContentLoadingManagerService::Init()
|
||||
|
||||
// Calculate amount of loading threads to use
|
||||
const CPUInfo cpuInfo = Platform::GetCPUInfo();
|
||||
const int32 count = Math::Clamp(static_cast<int32>(LOADING_THREAD_PER_PHYSICAL_CORE * (float)cpuInfo.ProcessorCoreCount), 1, 6);
|
||||
const int32 count = Math::Clamp(static_cast<int32>(LOADING_THREAD_PER_LOGICAL_CORE * (float)cpuInfo.LogicalProcessorCount), 1, 12);
|
||||
LOG(Info, "Creating {0} content loading threads...", count);
|
||||
|
||||
// Create loading threads
|
||||
|
||||
Reference in New Issue
Block a user