-
Notifications
You must be signed in to change notification settings - Fork 40
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
Feature/string builder optimise #68
base: master
Are you sure you want to change the base?
Feature/string builder optimise #68
Conversation
… before the task-counter is updated (it updates on a background task).
…xpense of slightly slower sends.
@@ -1,12 +1,13 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
|
|||
<PropertyGroup> | |||
<TargetFrameworks>net45</TargetFrameworks> | |||
<TargetFrameworks>net452;net6.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add support for net462
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Net452 is fine - net 462 project can happily reference the 452 build
serializedEventInfo = SerializeEventInfo(ei); | ||
} | ||
else | ||
if (formatter != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it possible for DE and NL locales to get data through this call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see you have a PR already to do this. This one should stay focused on improving memory usage, and your PR can provide DE / NL locale support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update as per suggestions
@jayaraut I don't think there's any need for this PR to address those issues - pls see my comments. |
Alternate approaches for buffering data before sending to Splunk, aiming to avoid Large Object Heap allocations. I've got 3 alternative approaches each which allocates less on the LOH than the original...
Keen for feedback on if we should offer them all / remove some..
Here's some memory profiles
Original
StringBuilder ToString() at time of sending content:
Buffering to file, then using FileContent
Using a PushStreamContent to stream smaller JSON strings at point of HTTP send: