[Xamarin.Android.Build.Tasks] not so many log messages! #2952
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.
We used to have the pattern of including log messages at the beginning
of
Execute()
in MSBuild tasks:This was mostly here to improve diagnostic log output from XBuild,
which we no longer support.
MSBuild properly logs any input properties on MSBuild tasks, so we can
remove a lot of code!
There were a couple places I could go a step further:
<AndroidCreateDebugKey/>
and<AndroidZipAlign/>
I could removethe entire
Execute()
method.<JavaCompileToolTask/>
had anOnLogStarted
method I couldremove.
<Javac/>
also was overriding this method.I thought this might have some impact on build times, since logging
and
string.Format
takes some time (it's not free!).A build of the Xamarin.Forms app in this repo:
The overall build times vary quite a bit. So if I took a conservative
estimate it seems the initial build is 500ms better?
A more revealing difference, I think, is the size of these binlog
files:
These files are compressed, so if they are 2K-6K smaller that was a
lot of log messages...