-
Notifications
You must be signed in to change notification settings - Fork 461
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
Memory/reduce allocations in peer manager #4271
Memory/reduce allocations in peer manager #4271
Conversation
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.
Looks good to me. Reduces time 3x and allocations 4x:
| Method | Mean | Error | StdDev | Gen 0 | Allocated |
|------------------------ |-----------:|---------:|---------:|-------:|----------:|
| CleanupCandidatePeers_1 | 1,126.9 ns | 22.51 ns | 24.08 ns | 0.0992 | 1,664 B |
| CleanupCandidatePeers_2 | 406.7 ns | 6.85 ns | 6.41 ns | 0.0262 | 440 B
Allocations are from various places:
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.
Client instances seems to be running fine.
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.
Adding comments that help with review
Changes:
Reduce allocations in peer manager
More context: https://www.notion.so/nethermind/Memory-investigations-2aa0fa86988c4bf88849a66b7328f203#60e7fde6cfee4b5c9daa3e4b8507196f
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyTesting
Requires testing
In case you checked yes, did you write tests??