Skip to content
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

[Perf] Replace ByteBuffer.wrap() with ByteBuffer.allocate() #21161

Merged
merged 2 commits into from
May 5, 2021

Conversation

mikeharder
Copy link
Member

@mikeharder mikeharder commented May 4, 2021

  • ByteBuffer.allocate() ensures each ByteBuffer holds its own copy of the data, which more closely simulates real-world usage
  • With ByteBuffer.wrap(), the SDK memory usage is artificially low, since each ByteBuffer is sharing the same backing array

I ran one test to upload 300MB with parallel=8. Throughput was the same. Memory usage increased from 678 to 3560 MB.

@mikeharder mikeharder merged commit 0dccafe into Azure:master May 5, 2021
@mikeharder mikeharder deleted the perf-circular-buffer-flux branch May 5, 2021 00:30
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-java that referenced this pull request Oct 25, 2022
Release appcomplianceautomation microsoft.app compliance automation 2022 11 16 preview 1 (Azure#21074)

* add appcomplianceautomation specs

* update appcomplianceautomation specs for 2022-11-16-preview

* remove privatepreview and beta (Azure#21124)

Co-authored-by: Yanwen Liu <[email protected]>

* Release appcomplianceautomation microsoft.app compliance automation 2022 11 16 preview resolve comments 2 (Azure#21152)

* fix comments

* remove duplicate in body

* resolve comments

* edit examples to match schema

* fix failure

* fix model validation

* change passed to passedCount

* add x-ms-enum to isPass

* change delete 200 description

Co-authored-by: Yanwen Liu <[email protected]>

* set sasUri x-ms-secret to true (Azure#21161)

Co-authored-by: Yanwen Liu <[email protected]>

* remove properties from download request body (Azure#21184)

* remove properties from download request body

* remove properties in snapshot_resourcelist_download.json

* keep statuscode 201 and 202 in patch report response, due to RPSaas will change 202 to 201

* add body in patch report 201 response

Co-authored-by: Yanwen Liu <[email protected]>

* change ProvisioningState Cancelled to Canceled, and some descriptions (Azure#21237)

* change ProvisioningState Cancelled to Canceled, and some descriptions

* add x-ms-enum extension to ComplianceState

Co-authored-by: Yanwen Liu <[email protected]>

Co-authored-by: Yanwen Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants