MSBuildStructuredLog icon indicating copy to clipboard operation
MSBuildStructuredLog copied to clipboard

Use distributed loggers to improve perf

Open KirillOsenkov opened this issue 5 years ago • 0 comments

From @AndyGerlicher:

https://github.com/AndyGerlicher/msbuild/tree/binarylogperf

That’s the branch I have. No idea what state it’s in at the moment or if it builds. I had spent time on trying to merge it into a single file that looked the same and in the same order at the end of the build. I’m not sure if that works or not. Your idea of just putting them in as blobs is probably better, but it also completely breaks compat. I think mine only had a small difference (something needed a timestamp I think?).

The main change is here: https://github.com/AndyGerlicher/msbuild/commit/a1b49e09a36eb5bc6546640f66e66373f03b9f73#diff-44a058faa22f024c71a08263069158bcL184

That stops forwarding events (except ProjectImported when not on the master node) and calls Write on the node. And it can do that because it implements INodeLogger and IForwardingLogger. And when the logger gets attached in XMake.cs it’s added to distributedLoggerRecords instead of loggers.

Andy

KirillOsenkov avatar Jan 12 '19 00:01 KirillOsenkov