Skip to content

Skip lambda allocation in 'EventSourceCache'#1977

Merged
Sergio0694 merged 2 commits intostaging/2.3from
dev/no-capture-EventSourceCache
Apr 12, 2025
Merged

Skip lambda allocation in 'EventSourceCache'#1977
Sergio0694 merged 2 commits intostaging/2.3from
dev/no-capture-EventSourceCache

Conversation

@Sergio0694
Copy link
Member

Small optimization on .NET 8+, where we have the additional overload taking args.
This skips allocating the delegate + display class for the closure every time the method is called.

@Sergio0694 Sergio0694 added performance Related to performance work gc Related to garbage collection labels Apr 10, 2025
@Sergio0694 Sergio0694 requested a review from manodasanW April 10, 2025 23:11
@Sergio0694 Sergio0694 merged commit 5215dfa into staging/2.3 Apr 12, 2025
12 checks passed
@Sergio0694 Sergio0694 deleted the dev/no-capture-EventSourceCache branch April 12, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gc Related to garbage collection performance Related to performance work

2 participants