mirror of
https://github.com/nspcc-dev/neofs-sdk-go.git
synced 2026-03-01 04:29:18 +00:00
client: Optimize signature buffer pool #264
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#264
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 11, 2024).
Is your feature request related to a problem? Please describe.
Clientallows to specify buffer pool for signing defaulting tonspcc-dev/neofs-sdk-go@b312ddb08b/client/client.go (L96-L105)to sign any request, client selects an arbitrary buffer from the pool. If this buffer has sufficient size to encode the signed request parts, they are written into it. Otherwise, temp buffer of needed size is allocated for each part via
makei see following drawbacks of this approach:
make-allocated buffers aint pooled2 just does not allow reusing the buffer. 1 may worsen caching in some cases:
Describe the solution you'd like
Describe alternatives you've considered
no except keep as it is
Additional context
@cthulhu-rider commented on GitHub (Dec 11, 2024):
also wanna mention that when verifying responses, the buffers are always dynamic. They can also be pooled. This deserves a separate issue, but i suggest to create it only if current one is unblocked
@roman-khimov commented on GitHub (Dec 17, 2024):
We're misusing pools more often than not, my suggestion is to not touch it for now.