Steps to reproduce
Create a C++ Project with 300+ files. For simplicity, each file is a clones, named fromo file1.cpp to file file300.cpp. MSBuild project can use
#include <windows.h>
#include <__msvc_all_public_headers.hpp>
int somefunction() { return 0; }
msbuild.exe /t:ClCompile /p:UseMultiToolTask=true
I added some telemetry:
PostExecuteTool Part 1: 414ms
PostExecuteTool Part 2: 493ms
PostExecuteTool Part 2.1: 531ms
PostExecuteTool Part 2.2: 4800ms<!-- Jump here is only calling RemoveDependenciesFromEntryIfMissing()
PostExecuteTool Part 3: 4967ms
PostExecuteTool Total: 5019ms
Expected behavior
RemoveDependenciesFromEntryIfMissing() should take less time. 100ms or less.
Actual behavior
RemoveDependenciesFromEntryIfMissing() is took 4 seconds.
Notes:
CanonicalTrackedInputFiles.RemoveDependenciesFromEntryIfMissing() has a N^2 loop that is calling FileExists(). Adding a simple cache would speed up this process timing a lot.
OS info:
Windows 10, running under VS developer command prompt.
Steps to reproduce
Create a C++ Project with 300+ files. For simplicity, each file is a clones, named fromo file1.cpp to file file300.cpp. MSBuild project can use
msbuild.exe /t:ClCompile /p:UseMultiToolTask=true
I added some telemetry:
PostExecuteTool Part 1: 414ms
PostExecuteTool Part 2: 493ms
PostExecuteTool Part 2.1: 531ms
PostExecuteTool Part 2.2: 4800ms<!-- Jump here is only calling RemoveDependenciesFromEntryIfMissing()
PostExecuteTool Part 3: 4967ms
PostExecuteTool Total: 5019ms
Expected behavior
RemoveDependenciesFromEntryIfMissing() should take less time. 100ms or less.
Actual behavior
RemoveDependenciesFromEntryIfMissing() is took 4 seconds.
Notes:
CanonicalTrackedInputFiles.RemoveDependenciesFromEntryIfMissing() has a N^2 loop that is calling FileExists(). Adding a simple cache would speed up this process timing a lot.
OS info:
Windows 10, running under VS developer command prompt.