Attempt to reduce test build cost (#74471)
An evaluation of the cost of "Copy native test components to test output folder" indicates that there are 2 major performance bottlenecks in that routine. There are the findings I had 1. The routine spends significant time loading every test project into msbuild to determine what to do. This processing takes as much as 400ms per test on hardware which has slow IO performance. 2. On Unix platforms, when producing the test script binaries, we make the scripts executable by using chmod. This ALSO takes as long as 400ms on the slowest platforms. 3. Actually copying the native binaries around is extremely cheap and fast, and the cost to generate the test scripts is also fairly low. This change addresses both of these issues. 1. For the issue that we look into each test project to determine what to do, I observed that for tests which are pri1 tests, when running a pri0 only job, we don't need to even examine any of the tests marked as exclusively pri1. This is a bit of a hack, but it does seem to work quite well. 2. For the chmod issue, since we don't actually maintain the executable bit when sent to helix, I set an msbuild property when generating the scripts during the "Copy native test components to test output folder" to just not set that flag. Results: Mac OSX test run jobs take ~8 minutes to run this portion of the build, down from ~27 minutes. Performance improvements are visible on all architectures/OS pairings, but they aren't as dramatic.
Showing
想要评论请 注册 或 登录