Skip to content

WebFluxTags performs unnecessary Pattern compilation when ignoring trailing slashes #24147

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
wants to merge 1 commit into from

Conversation

stokpop
Copy link
Contributor

@stokpop stokpop commented Nov 13, 2020

Fix minor cpu hotspot where String.replaceAll calls Pattern.compile for each call. Reuse a precompiled Pattern.

Found in cpu profiling session on spring boot version: 2.3.5.RELEASE

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 13, 2020
@wilkinsona wilkinsona changed the title Fix minor cpu hotspot in WebFluxTags replaceAll Pattern.compile WebFluxTags performs unnecessary Pattern compilation when ignoring trailing slashes Nov 13, 2020
@wilkinsona wilkinsona added this to the 2.2.x milestone Nov 13, 2020
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 13, 2020
@snicoll snicoll self-assigned this Nov 18, 2020
@snicoll snicoll modified the milestones: 2.2.x, 2.2.12 Nov 18, 2020
snicoll pushed a commit that referenced this pull request Nov 18, 2020
@snicoll snicoll closed this in d96ff16 Nov 18, 2020
@snicoll
Copy link
Member

snicoll commented Nov 18, 2020

@stokpop thank you for making your first contribution to Spring Boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants