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

Create minimum buffer required for OpenRead #47958

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rlrossiter
Copy link
Contributor

LazyLoadingReadOnlyStream, when not specified an explicit buffer size, always selects 4MB as the buffer size. This is unnecessary if the underlying blob size (which comes in as initialLength) is smaller than that AND the blob does not allow modifications (meaning the blob will never grow any larger). In this case, the buffer size can simply be initialized to the length of the blob that will be read.

Fixes #47821

LazyLoadingReadOnlyStream, when not specified an explicit buffer size,
always selects 4MB as the buffer size. This is unnecessary if the
underlying blob size (which comes in as initialLength) is smaller than
that AND the blob does not allow modifications (meaning the blob will
never grow any larger). In this case, the buffer size can simply be
initialized to the length of the blob that will be read.
@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files) labels Jan 23, 2025
Copy link

Thank you for your contribution @rlrossiter! We will review the pull request and get back to you soon.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] OpenReadAsync overprovisions buffer memory
2 participants