我的CPU是 i7-6700k,4 核 8 线程,用 VS2022Pro 编译 UE5.1 时,为什么VS2022只使用单线程编译?
已启动编译
1>------ 已启动编译: 项目: UE5, 配置: Development_Editor x64 ------
1>Using bundled DotNet SDK version: 6.0.302
1>Running UnrealBuildTool: dotnet ".\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -Target="UnrealEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild
1>Log file: D:\UnrealEngine-5.1\Engine\Programs\UnrealBuildTool\Log.txt
1>Building UnrealEditor and ShaderCompileWorker.
1>Using Visual Studio 2022 14.31.31104 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.31.31103) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Determining max actions to execute in parallel (4 physical cores, 8 logical cores)
1> Executing up to 4 processes, one per physical core
1> Requested 1.5 GB free memory per action, 1.12 GB available: limiting max parallel actions to 1
1>Building 5394 actions with 1 process.
1>[1/5394] Compile Module.Core.4_of_19.cpp
1>[2/5394] Compile Module.Core.2_of_19.cpp
1>[3/5394] Copy AnimEncoding_VariableKeyLerp.ispc.generated.h
1>[4/5394] Compile Module.Core.12_of_19.cpp
如上,输出窗口提示了:Building 5394 actions with 1 process.
但是根据我的CPU核心数量,它应该是使用 8 线程编译才对。
我尝试修改 UnrealEngine-5.1\Engine\Saved\UnrealBuildTool\BuildConfiguration.xml,
改成如下内容:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<BuildConfiguration>
<bAllowFASTBuild>false</bAllowFASTBuild>
<bUseXGEController>false</bUseXGEController>
<bAllowXGE>false</bAllowXGE>
</BuildConfiguration>
<LocalExecutor>
<MaxProcessorCount>8</MaxProcessorCount>
<ProcessorCountMultiplier>1</ProcessorCountMultiplier>
</LocalExecutor>
</Configuration>
也是不起作用的,还是 1 个线程在编译。
我再将上面的 LocalExecutor 改为 ParallelExecutor,
仍然不行,依旧是 1 个线程在编译。
有人知道怎么让它以 8 线程编译吗?
非常感谢。