-
Notifications
You must be signed in to change notification settings - Fork 328
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
pref: remove sync.Pool and prev allocate buffer for small tx #384
Conversation
I merge another PR just now. And there is raising some conflicts in this PR. Could you help resolve them? Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #384 +/- ##
==========================================
+ Coverage 60.46% 60.55% +0.09%
==========================================
Files 25 25
Lines 4320 4340 +20
==========================================
+ Hits 2612 2628 +16
- Misses 1494 1498 +4
Partials 214 214
|
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.
LGTM. Thanks for this contribution.
Based on issue #354, I have removed the usage of sync.pool. If it is a write transaction, it is always concurrency-safe. Instead, I have added a preallocated Buffer for reuse, and only transactions larger than this Buffer size will trigger a new Buffer.