Optimize memory allocations #784

Merged
dstepanov-yadro merged 1 commit from dstepanov-yadro/frostfs-node:feat/object_serialization into master 2024-09-04 19:51:04 +00:00

Relates #531

Add optimization from TrueCloudLab/frostfs-api-go#58

Relates #531 Add optimization from https://git.frostfs.info/TrueCloudLab/frostfs-api-go/pulls/58
dstepanov-yadro added 2 commits 2023-11-02 14:40:54 +00:00
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
[#531] signSvc: Add SetMarshaledData method call
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 1m25s
DCO action / DCO (pull_request) Successful in 1m36s
Build / Build Components (1.21) (pull_request) Successful in 2m40s
Build / Build Components (1.20) (pull_request) Successful in 3m2s
Tests and linters / Tests (1.21) (pull_request) Successful in 5m41s
Tests and linters / Staticcheck (pull_request) Successful in 5m32s
Tests and linters / Lint (pull_request) Successful in 5m59s
Tests and linters / Tests (1.20) (pull_request) Successful in 6m3s
Tests and linters / Tests with -race (pull_request) Successful in 6m6s
20d6132f31
To reduce memory allocations add `SetMarshaledData` method call
to return already marshalled data in next `StableMarshal` calls.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
fyrchik approved these changes 2023-11-02 14:45:56 +00:00
@ -122,6 +122,7 @@ func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*objec
}
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error) {
req.GetBody().SetMarshalData(nil)
Owner

Why do we need this line?

Why do we need this line?
Author
Member

Here we marshal data and store it in PutSingleRequest, so next StableMarshal calls (for signature verification and save to shard) will use already prepared data.

Here we marshal data and store it in PutSingleRequest, so next `StableMarshal` calls (for signature verification and save to shard) will use already prepared data.
dstepanov-yadro requested review from storage-core-committers 2023-11-02 14:48:15 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-11-02 14:48:15 +00:00
acid-ant approved these changes 2023-11-03 07:47:51 +00:00
dstepanov-yadro merged commit 20d6132f31 into master 2023-11-03 13:09:34 +00:00
dstepanov-yadro deleted branch feat/object_serialization 2023-11-03 13:09:34 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#784
No description provided.