Skip to content

EventSourceLoggerProvider allocates *ALOT* #864

Closed
@davidfowl

Description

@davidfowl

Looking at some 3.0 memory profiles, it seems as though the event source logger we added by default in 2.2 increases the amount of pressure we put on the GC.

This application made ~67000 requests:

These are the top per request allocations (by size):

image

The boxed Int32, the Object[], the KeyValuePair<string, string>[], the List<KeyValuePair<string, string>> the EventSource.EventSourceLogger+ActivityScope all come from the EventSourceLogger and the LoggingEventSource.

Here a view from the allocation callsites:

image
image

We need to investigate this and avoid this many allocations.

cc: @pakrym

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions