opentelemetry-dotnet
opentelemetry-dotnet copied to clipboard
Perf improvement using zero-alloc foreach
https://github.com/open-telemetry/opentelemetry-dotnet/pull/1078#discussion_r470401687
Potential places that we want to improve:
- Processor chain (CompositeActivityProcessor).
- Exporter interface (a batch of spans).
- Resource attributes.
@CodeBlanch has an idea of using union approach to address the IEnumerator improvement among Processor/CircularBuffer/Exporter.
There's been a fix related to this, if there's more work I'd suggest a more targeted suggestion.
Most of the work has completed, if there's more work then you can reopen with the specific suggestions and why, or create a new targeted ticket for them.
I think there's been a tonne of work around allocations in the project, so it's probably something that has already been done. So I'm going to mark this as complete.