getsentry / getsentry/sentry-dotnet
perf: use `ConfigureScope` overload to avoid Closure allocations where possible
Open
.NET
Improvement
Performance
- Dominant language
- C#
- Stars
- 770
- Forks
- 248
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 49
Description
### Description
### Summary
Use `ConfigureScope` overload that receives _"state"_ to avoid Closure allocations where possible.
### Remarks
In #4244, we added a `ConfigureScope` overload that takes _state_ in order to avoid Closure-allocations.
After #5039 (see https://github.com/getsentry/sentry-dotnet/pull/5039#discussion_r3222023584), there is another location to avoid the Closure.
After a quick search, I believe there are 2 or 3 additional opportunities to avoid the Closure.
Contributor guide
Assessment
This issue has not been assessed yet.