mirror of
https://github.com/nspcc-dev/neofs-sdk-go.git
synced 2026-03-01 04:29:18 +00:00
client: Cache small data chunks before PUTing them #246
Labels
No labels
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U2
U2
U3
U4
blocked
bug
client
config
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
pool
question
security
task
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-sdk-go#246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cthulhu-rider on GitHub (Dec 5, 2024).
Is your feature request related to a problem? Please describe.
https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/client#DefaultObjectWriter.Write sends at least one message to the underlying stream when chunk is non-empty regardless of its size. Each message requires preparation incl. pretty heavyweight cryptography. The server also verifies each message. Even besides app processing, in general, the more messages the slower the stream
thus, unintentional transition to granular chunks (e.g. when using
io.Copy) can significantly slow down the processDescribe the solution you'd like
bufferize smaller chunks, and flush the buffer to the stream when it's full. This would minimize the number of messages
the disadvantage of this approach will be an additional buffer for each operation. Diff with the current approach will require careful benchmark testing
there is also a nuance with dynamic buffer allocation: how to know if the intended data volume (unknown in general) is less than the limit so to not overallocated the buffer? In special cases, we can make a hypothesis:
Describe alternatives you've considered
Additional context
Clienttesting