-
Notifications
You must be signed in to change notification settings - Fork 15
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
Preallocate buffers to object uploads #835
Conversation
015b913
to
3997b60
Compare
Codecov Report
@@ Coverage Diff @@
## master #835 +/- ##
==========================================
- Coverage 34.05% 33.86% -0.19%
==========================================
Files 61 62 +1
Lines 10472 10529 +57
==========================================
Hits 3566 3566
- Misses 6505 6562 +57
Partials 401 401
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
27163a8
to
ec47db0
Compare
ce7d2d8
to
a5eab85
Compare
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.
Can slicer reuse buffers as well?
Pool-based code is simpler in general.
5641ff7
to
86aa06f
Compare
closes #833 Signed-off-by: Evgenii Baidakov <[email protected]>
4253ce3
to
f0f5a22
Compare
Supported |
The test requires real neofs cluster to execute. We are checking the object after uploading. Signed-off-by: Evgenii Baidakov <[email protected]>
f0f5a22
to
1ba680c
Compare
chunk := make([]byte, x.cfg.MaxObjectSize) | ||
_, err = io.CopyBuffer(writer, prm.Payload, chunk) | ||
data := x.buffers.Get() | ||
chunk := data.(*[]byte) |
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.
Likely some Go 1.2X will bring generic-based Pool
to us.
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.
It would be great, but 1.21 still have any
version
closes #833