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

[STJ] PooledBufferWriter unnecessarily clears its buffers on every flush operation. #109979

Closed
eiriktsarpalis opened this issue Nov 19, 2024 · 1 comment · Fixed by #111348
Closed
Assignees
Labels
area-System.Text.Json in-pr There is an active PR which will close this issue when it is merged tenet-performance Performance related issue
Milestone

Comments

@eiriktsarpalis
Copy link
Member

          I've refactored the code following Miha's suggestion, but it seems STJ is susceptible to the same issue. Effectively, the buffer is being cleared every time we flush to the underlying stream.

_rentedBuffer.AsSpan(0, _index).Clear();

I'll file an issue.

Originally posted by @eiriktsarpalis in #109832 (comment)

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 19, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 19, 2024
@eiriktsarpalis eiriktsarpalis added area-System.Text.Json enhancement Product code improvement that does NOT require public API changes/additions tenet-performance Performance related issue and removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners enhancement Product code improvement that does NOT require public API changes/additions labels Nov 19, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

@MihaZupan MihaZupan self-assigned this Nov 21, 2024
@MihaZupan MihaZupan added this to the 10.0.0 milestone Nov 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Jan 13, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json in-pr There is an active PR which will close this issue when it is merged tenet-performance Performance related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants