-
Notifications
You must be signed in to change notification settings - Fork 51
Clean up memories when syncing #1585
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
Conversation
@HoOngEe Would you shrink |
Before shrinking |
We have to shrink |
4147c49
to
134c094
Compare
@HoOngEe I know still there is a memory to cleaning up. However, I think it's hard to fix the problem, there is no apparent time to clean the cache. It should change the implementation to LRU like implementation. |
@sgkim126 Ok, let's merge this pr now and fix the cache implementation later. |
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.
Please remove WIP tag when you think it's ready to merge.
core/src/verification/queue/mod.rs
Outdated
@@ -429,6 +430,7 @@ impl<K: Kind> VerificationQueue<K> { | |||
*td -= score; | |||
} | |||
} | |||
processing.shrink_to_fit(); |
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.
This seems redundant.
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.
Yes, It's redundant. I fixed it. Thank you.
29c49c8
to
603c211
Compare
Shrink HashMaps and Vectors of downloaders and Verification queue to reduce the memory usage when syncing.
603c211
to
0f4cded
Compare
@HoOngEe LGTM. Please apply it to rc-1.4.0 too. |
The commits in this pr piled upon the #1567
It closes #1576