Skip to content

Avoid unused NetEventSource code - #73868

Merged
MihaZupan merged 5 commits into
dotnet:mainfrom
MihaZupan:eventsource-size-cleanup
Aug 15, 2022
Merged

Avoid unused NetEventSource code#73868
MihaZupan merged 5 commits into
dotnet:mainfrom
MihaZupan:eventsource-size-cleanup

Conversation

@MihaZupan

@MihaZupanMihaZupan commented Aug 12, 2022

Copy link
Copy Markdown
Member

Fixes#54859

  • Removed a copy of NetEventSource.Common.cs from the aspnetcore shared folder - completely unused
  • Split of Associate and DumpBuffer methods into separate partial files that are optionally included by projects that actually use them
  • Removed as many constants and code from the NetEventSource.Common where possible (e.g. only used by a single project)
  • Moved some Windows-specific logging code out of the shared class
  • Removed a bunch of redundant IsEnabled checks

Release assembly sizes:

Windows (-10 KB):

AssemblyBeforeAfterDiff
System.Net.Http.dll632320631808-512
System.Net.Http.WinHttpHandler.dll136704130560-6144
System.Net.HttpListener.dll269312268288-1024
System.Net.NetworkInformation.dll7628874752-1536
System.Net.Security.dll248832247808-1024

Linux: (-3.5 KB)

AssemblyBeforeAfterDiff
System.Net.Http.dll622080621568-512
System.Net.HttpListener.dll121856121344-512
System.Net.NetworkInformation.dll8243280896-1536
System.Net.Security.dll301056300544-512
System.Net.Sockets.dll218624218112-512

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #54859

  • Removed a copy of NetEventSource.Common.cs from the aspnetcore shared folder - completely unused
  • Split of Associate and DumpBuffer methods into separate partial files that are optionally included by projects that actually use them
  • Removed as many constants and code from the NetEventSource.Common where possible (e.g. only used by a single project)
  • Moved some Windows-specific logging code out of the shared class
  • Removed a bunch of redundant IsEnabled checks

Release assembly sizes:

Windows (-10 KB):

AssemblyBeforeAfterDiff
System.Net.Http.dll632320631808-512
System.Net.Http.WinHttpHandler.dll136704130560-6144
System.Net.HttpListener.dll269312268288-1024
System.Net.NetworkInformation.dll7628874752-1536
System.Net.Security.dll248832247808-1024

Linux:
ToDo

Author:MihaZupan
Assignees:-
Labels:

area-System.Net

Milestone:-

@MihaZupan

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MihaZupan
MihaZupanforce-pushed the eventsource-size-cleanup branch from c14831e to d38203fCompareAugust 12, 2022 22:54
@MihaZupan
MihaZupan marked this pull request as ready for review August 14, 2022 18:34
@CarnaViire

Copy link
Copy Markdown
Member

Will you update the PR soon @MihaZupan ? 😄

@MihaZupan

MihaZupan commented Aug 15, 2022

Copy link
Copy Markdown
MemberAuthor

Yes, just waiting for VS to update :)

Soon™️

@CarnaViireCarnaViire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@MihaZupan

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MihaZupanMihaZupan reopened this Aug 15, 2022
@MihaZupan

MihaZupan commented Aug 15, 2022

Copy link
Copy Markdown
MemberAuthor

Restarting CI after #73962

Regular CI was already clean.

I see no networking outerloop failures now.

@MihaZupan

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MihaZupanMihaZupan added this to the 7.0.0 milestone Aug 15, 2022
@MihaZupan
MihaZupan merged commit 13733cd into dotnet:mainAug 15, 2022
@ghostghost locked as resolved and limited conversation to collaborators Sep 15, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom EventSources in shared library seem to have unused code

2 participants

@MihaZupan@CarnaViire