-
-
Notifications
You must be signed in to change notification settings - Fork 25
Remove unnecessary EventArgs allocation in HighResTimer
#206
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
base: main
Are you sure you want to change the base?
Conversation
There's a minor optimization in HighResTimer where we can avoid allocating a new EventArgs object every time the timer elapses. Instead, we can use EventArgs.Empty to reduce memory usage and improve performance which is especially important in resource-constrained environments. Signed-off-by: Anton Kulikov <[email protected]>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@dotnet-policy-service agree |
EventArgs allocation in HighResTimer
|
\azp run |
josesimoes
left a comment
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.
LGTM! Thank you for the improvement.
EventArgs allocation in HighResTimerEventArgs allocation in HighResTimer
Description
There's a minor optimization in HighResTimer where we can avoid allocating a new EventArgs object every time the timer elapses. Instead, we can use EventArgs.Empty to reduce memory usage and improve performance, which is especially important in resource-constrained environments.
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: