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

Use pooled buffer for flushing encrypted message blocks #3975

Merged
merged 1 commit into from Mar 16, 2023

Conversation

neilalexander
Copy link
Member

We already have a pool of buffers that are going to be more than big enough most of the time, so this should save a lot of allocations if the file store is encrypted.

@neilalexander neilalexander requested a review from a team as a code owner March 16, 2023 17:44
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neilalexander
Copy link
Member Author

neilalexander commented Mar 16, 2023

Running TestFileStoreEncrypted 10,000x on main on my machine takes 30s, allocates 15GB, GC worker at 2.77% CPU.

By comparison, on this branch, it takes 26s, allocates 35MB and reduces the GC worker down to 0.31% CPU.

@neilalexander neilalexander merged commit 5c437a2 into main Mar 16, 2023
2 checks passed
@neilalexander neilalexander deleted the neil/encbuffer branch March 16, 2023 18:09
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.

None yet

2 participants