Skip to content

MarshallingView should avoid temporary byte array when copying to response [SPR-11646] #16269

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
spring-projects-issues opened this issue Apr 1, 2014 · 0 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Apr 1, 2014

Juergen Hoeller opened SPR-11646 and commented

MarshallingView's current code:

StreamUtils.copy(baos.toByteArray(), response.getOutputStream());

can be optimized to:

baos.writeTo(response.getOutputStream());

in order to avoid the temporary copy in a byte array.


Affects: 3.2.8, 4.0.3

Issue Links:

Backported to: 3.2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants