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 startup byte[] allocation in EventSource #32276

Merged
merged 1 commit into from
Feb 15, 2020

Conversation

stephentoub
Copy link
Member

Only occurs once and is then cached, but it's hit on startup, and may as well remove it.

	IL_0000: ldsflda valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=16' '<PrivateImplementationDetails>'::BABB0FF3A59F6738CDF14170DA56230D6528DC9D619C5860288B86A4E3B29D63
	IL_0005: ldc.i4.s 16
	IL_0007: newobj instance void valuetype System.ReadOnlySpan`1<uint8>::.ctor(void*, int32)
	IL_000c: stloc.0

cc: @noahfalk

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Stephen!

Only occurs once and is then cached, but it's hit on startup, and may as well remove it.
@stephentoub
Copy link
Member Author

I had to put the old code back under ifdef to not break the downlevel assembly. What is that library for?

@noahfalk
Copy link
Member

My understanding is that ES_BUILD_STANDALONE define is to build this nuget package, which was offered as an out-of-band release vehicle for some EventSource functionality before it was available in the official runtime release. At this point I don't think we release this thing any more and I doubt there is any purpose to keeping the define or the project in our source.

@brianrob - does that sound right?

@stephentoub stephentoub merged commit a42c583 into dotnet:master Feb 15, 2020
@stephentoub
Copy link
Member Author

@stephentoub stephentoub deleted the startuparray branch February 15, 2020 09:41
@brianrob
Copy link
Member

It's actually this package: https://www.nuget.org/packages/Microsoft.Diagnostics.Tracing.EventSource.Redist/

You're right that it's an out-of-band release vehicle for EventSource - specifically for desktop, since it's hard to get fixes to desktop customers in a timely manner. I would recommend not getting rid of this, as the problem of shipping fixes to desktop customers isn't likely to go away, and this is a thing that comes up every once and while, and is always a high-priority thing when it comes up. The last time it was a big deal, we didn't have a way to produce a package, and thus I ended up doing the work to add it here.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants