python-autopxd2
python-autopxd2 copied to clipboard
VSWhere search for cl.exe on Windows takes 500s on CI
For instance this job on CI takes 537.18s for a pip install + pytest: https://github.com/elijahr/python-autopxd2/actions/runs/10784358066/job/29920722125
After more test, most of this time is taken by "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease latest -format json -utf8 -find "**\bin\HostX64\x64\cl.exe"
My guess is the ** pattern that may search in far too many places :/
see https://github.com/microsoft/vswhere/issues/318
You may be right about the **. Probably some code could be written to look in some expected places first, to optimize lookup for the "happy path", and then fall back to the slower ** lookup. I don't have a Windows machine to experiment with.