Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant creation of Forwarding logger with NullLogger #10125

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JanKrivanek
Copy link
Member

@JanKrivanek JanKrivanek commented May 10, 2024

Context

Random discovery - we create NullLogger even when we have other logger(s) registered (e.g. ConsoleLogger, TerminalLogger ...).

We need to make sure that Projcet started and finished events are being transfered - we can 'hijack' the existing registration of ConfigurableLForwardingLogger for that - we just need to inspect and adjust existing registration

Motivation

Build with just the built-in loggers (TerminalLogger, ConsoleLogger, FileLogger) is probably the most common configuration - and we are injecting extra forwarder to each such a build - so while it's likely very small savings (as only couple events was redundantly de/serialized, rest was quickly skipped) - it applies very broadly.

Perf

Following measurements were done using the OrchardCore and bootstrapped release MSBuild.exe with following 3 scenarios:

  • MSBuild.exe -m
  • MSBuild.exe -v:m -m
  • MSBuild.exe -tl -m

Each scenario for each branch for 3 runs after the warmup run. Clean and kill of msbuild/dotnet/vbcscompiler processes between each individual runs. Median value choosed for each scenario.

The versions that has been tested were:

MSBuild.exe -m MSBuild.exe -v:m -m MSBuild.exe -tl -m
Main 00:00:36.02 00:00:31.86 00:00:33.22
Logging Svc fix 00:00:35.57 00:00:30.89 00:00:33.79
Expanders refactor 00:00:36.66 00:00:32.43 00:00:32.49

Testing

Pre-existing tests

@JanKrivanek JanKrivanek changed the title [Experiment] Remove redundant creation of NullLogger Remove redundant creation of Forwarding logger with NullLogger May 13, 2024
@JanKrivanek JanKrivanek marked this pull request as ready for review May 13, 2024 17:51
@JanKrivanek JanKrivanek requested a review from rokonec May 15, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants