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

[metrics] Optimize lookup costs using .NET 9 alternative lookup #5777

Open
cijothomas opened this issue Aug 7, 2024 · 0 comments
Open

[metrics] Optimize lookup costs using .NET 9 alternative lookup #5777

cijothomas opened this issue Aug 7, 2024 · 0 comments
Labels
enhancement New feature or request metrics Metrics signal related needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package perf Performance related
Milestone

Comments

@cijothomas
Copy link
Member

cijothomas commented Aug 7, 2024

Metrics hot path now involves copying the incoming ReadOnlySpan into a Thread-Local array to do the dictionary lookup. With the new capability to lookup Dictionary with just ReadOnlySpan, we can avoid the thread-local copy cost. Opening an issue to track this.

Unrelated/Related : Rust's Dictionary(hashmap) already allowed such lookups, and I leveraged that in OTel Rust metrics and avoided entire copy costs and got good per gains (open-telemetry/opentelemetry-rust#1989).

@vishweshbankwar vishweshbankwar added the enhancement New feature or request label Aug 12, 2024
@CodeBlanch CodeBlanch added metrics Metrics signal related perf Performance related labels Aug 16, 2024
@CodeBlanch CodeBlanch added this to the Future milestone Aug 16, 2024
@CodeBlanch CodeBlanch added the needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package label Aug 16, 2024
@CodeBlanch CodeBlanch changed the title Metric Update - Optimize lookup costs [metrics] Optimize lookup costs using .NET 9 alternative lookup Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request metrics Metrics signal related needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package perf Performance related
Projects
None yet
Development

No branches or pull requests

3 participants