Vcpkg spawns processes with IDLE_PRIORITY_CLASS
, causing slow builds with low CPU usage on Windows
#42715
Labels
category:vcpkg-feature
The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Describe the bug
Build related processes like Ninja spawned by vcpkg seem to have a very low priority, causing the build to use very few CPU cores despite setting the VCPKG_MAX_CONCURRENCY to a high value.
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
At least give it a normal priority!
Additional context
The issue is caused by this in
windows_create_process
which vcpkg uses to spawn subprocesses on Windows. For some reason, the priority is set to IDLE_PRIORITY_CLASS, which according to the doc, 'run only when the system is idle'. This is probably affecting the performance of vcpkg for years as it was introduced in the very beginning of the commit history.By setting the value to NORMAL_PRIORITY_CLASS, I was able to fix this issue. Please change this or make this configurable. I would be happy to make a pr if this is indeed a bug.
The text was updated successfully, but these errors were encountered: