You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
UE4 - If the number of physical cores is greater than 4 and not equal to the number of logical cores, then use the average of the two core counts for the number of parallel compiles.
[CL 2579870 by Gil Gribb in Main branch]
This commit is contained in:
committed by
gil.gribb@epicgames.com
parent
87f1c0c0d4
commit
a5393497b9
@@ -363,10 +363,17 @@ namespace UnrealBuildTool
|
||||
}
|
||||
// The number of actions to execute in parallel is trying to keep the CPU busy enough in presence of I/O stalls.
|
||||
int MaxActionsToExecuteInParallel = 0;
|
||||
// The CPU has more logical cores than physical ones, aka uses hyper-threading.
|
||||
if( NumCores < System.Environment.ProcessorCount )
|
||||
if (NumCores < System.Environment.ProcessorCount && BuildConfiguration.ProcessorCountMultiplier != 1.0)
|
||||
{
|
||||
MaxActionsToExecuteInParallel = (int) (NumCores * BuildConfiguration.ProcessorCountMultiplier);
|
||||
// The CPU has more logical cores than physical ones, aka uses hyper-threading.
|
||||
// Use multiplier if provided
|
||||
MaxActionsToExecuteInParallel = (int)(NumCores * BuildConfiguration.ProcessorCountMultiplier);
|
||||
}
|
||||
else if (NumCores < System.Environment.ProcessorCount && NumCores > 4)
|
||||
{
|
||||
// The CPU has more logical cores than physical ones, aka uses hyper-threading.
|
||||
// Use average of logical and physical if we have "lots of cores"
|
||||
MaxActionsToExecuteInParallel = (int)(NumCores + System.Environment.ProcessorCount) / 2;
|
||||
}
|
||||
// No hyper-threading. Only kicking off a task per CPU to keep machine responsive.
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user