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

Prevent unnecessary allocations in NetManager.ProcessNtpRequests. #573

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

adamwych
Copy link
Contributor

@adamwych adamwych commented Jan 29, 2025

While profiling I noticed that ConcurrentQueue's enumerator, which is used by ProcessNtpRequests is unnecessarily allocating a lot of data. I don't know internal details about that, but simple early return if there's no NTP requests to process seems to fix it.

image image

@RevenantX RevenantX merged commit dae6127 into RevenantX:master Jan 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants