perf fixes copy from dotutils and MSBuildStructuredLog #10792
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #10674 #10675
Context
dotutils/streamutils#2 makes more performant custom implementations of streams which can be copied here
KirillOsenkov/MSBuildStructuredLog#821 indroduced changes to BuildEventArgsReader which should be the same in MSBuildStructuredLog, this PR copies these changes.
Changes Made
3 commits
Testing
perf improvement validation setup:
versionX\artifacts\bin\bootstrap\core\dotnet.exe build ThisPRVersion\msbuild.binlog
Results on Devbox machine:
Command 1:
.\msbuild\artifacts\bin\bootstrap\core\dotnet.exe build .\msbuild\msbuild.binlog
Average runtime: 1790.30201 ms
Standard deviation: 247.701794004614 ms
Command 2:
.\msbuildbase\artifacts\bin\bootstrap\core\dotnet.exe build .\msbuild\msbuild.binlog
Average runtime: 2202.75113 ms
Standard deviation: 146.88933492219 ms
T-statistic: -14.3221294766752
degrees of freedom 100-1
pvalue <0.0001, we can reject the hypothesis that the distributions have the same mean, the alternate hypothesis is that the change is faster.
We got a ~23% speedup for this scenario.
(even better results on OrchardCore, but less rigorously obtained)
Notes