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

Let UriUtils.encode…(…) methods optimize for sources without the need to be encoded #24152

Closed
odrotbohm opened this issue Dec 6, 2019 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@odrotbohm
Copy link
Member

The encoding methods always create ByteArrayOutputStream for each input String, even dropping that in case the source String was traversed without a single character being encoded. As the values usually passed into such methods are usually designed to be used in URIs (e.g. (numeric) identifiers), chances are high that the method is called a lot with sources that don't have to be encoded in the first place.

@odrotbohm odrotbohm added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Dec 6, 2019
@jhoeller jhoeller added the type: enhancement A general enhancement label Dec 6, 2019
@jhoeller jhoeller added this to the 5.2.3 milestone Dec 6, 2019
@rstoyanchev
Copy link
Contributor

We could probably backport?

@jhoeller jhoeller added the for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x label Dec 6, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x labels Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) 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

4 participants