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

Add Sync Pool For Snappy #6085

Merged
merged 4 commits into from Jun 2, 2020
Merged

Add Sync Pool For Snappy #6085

merged 4 commits into from Jun 2, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Jun 2, 2020

What type of PR is this?

Feature Improvement

What does this PR do? Why is it needed?

Currently for each instance of a snappy reader/writer it allocates 100 kb of memory. This is very expensive to do often and is a potential DOS vector as we receive multiple p2p rpc requests over the wire. To mitigate this we instead use a sync pool so that the reader and writer can be constantly re-used and memory does not have to be constantly allocated.

Which issues(s) does this PR fix?

N.A

Other notes for review

N.A

@nisdas nisdas requested a review from a team as a code owner June 2, 2020 15:26
@nisdas nisdas added the Ready For Review A pull request ready for code review label Jun 2, 2020
rauljordan
rauljordan previously approved these changes Jun 2, 2020
terencechain
terencechain previously approved these changes Jun 2, 2020
@rauljordan rauljordan merged commit 4694998 into master Jun 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the poolSnappy branch June 2, 2020 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants