python-autopxd2 icon indicating copy to clipboard operation
python-autopxd2 copied to clipboard

VSWhere search for cl.exe on Windows takes 500s on CI

Open touilleMan opened this issue 1 year ago • 1 comments

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 :/

touilleMan avatar Sep 10 '24 09:09 touilleMan

see https://github.com/microsoft/vswhere/issues/318

touilleMan avatar Sep 10 '24 09:09 touilleMan

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.

elijahr avatar Nov 17 '24 21:11 elijahr