8000 Add optimized DataBufferInputStream overrides by kilink · Pull Request #34799 · spring-projects/spring-framework · GitHub
[go: up one dir, main page]

Skip to content

Add optimiz 8000 ed DataBufferInputStream overrides #34799

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

Closed

Conversation

kilink
Copy link
Contributor
@kilink kilink commented Apr 22, 2025

Add optimized DataBufferInputStream overrides for readNBytes, skip, and transferTo; all of them allocate byte buffers which we can either avoid (in the case of skip) or size more precisely since the number of remaining bytes is known.

Note that transferTo could potentially be optimized further; for instance if the passed in OutputStream is a DataBufferOutputStream, it could potentially do some special handling.

Add optimized DataBufferInputStream overrides for readNBytes, skip, and transferTo; all of them
allocate byte buffe
8000
rs which we can either avoid (in the case of skip) or size more precisely since
the number of remaining bytes is known.

Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com>
@kilink kilink force-pushed the data-buffer-inputstream-overrides branch from 1c80d32 to 9b1b474 Compare April 22, 2025 23:05
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 22, 2025
@bclozel bclozel self-assigned this Jun 3, 2025
@bclozel bclozel added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 3, 2025
@bclozel bclozel added this to the 6.2.8 milestone Jun 3, 2025
@bclozel bclozel added the in: core Issues in core modules (aop, beans, core, context, expression) label Jun 3, 2025
@bclozel bclozel closed this in 182d654 Jun 3, 2025
@bclozel
Copy link
Member
bclozel commented Jun 3, 2025

Thanks @kilink and sorry for the delay. I merged this back into 6.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0