Skip to content

Conversation

@Amanieu
Copy link
Member

@Amanieu Amanieu commented Dec 17, 2025

#148937: Remove initialized-bytes tracking from BorrowedBuf and BorrowedCursor

This caused several performance regressions because of existing code which uses Read::read and therefore requires full buffer initialization. This is particularly a problem when the same buffer is re-used for multiple read calls since this means it needs to be fully re-initialized each time.

There is still some benefit to landing the API changes, but we will have to add private APIs so that the existing infrastructure can track and avoid redundant initialization.

…owedBuf` and `BorrowedCursor`)

This caused several performance regressions because of existing code
which uses `Read::read` and therefore requires full buffer
initialization. This is particularly a problem when the same buffer is
re-used for multiple read calls since this means it needs to be fully
re-initialized each time.

There is still some benefit to landing the API changes, but we will have
to add private APIs so that the existing infrastructure can
track and avoid redundant initialization.
@rustbot rustbot added O-SGX Target: SGX O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@Amanieu Amanieu changed the title Revert: Remove initialized-bytes tracking from BorrowedBuf Revert #148937 Dec 17, 2025
@ChrisDenton
Copy link
Member

r? @ChrisDenton

r=me when PR CI passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-SGX Target: SGX O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants