Skip to content
This repository was archived by the owner on Aug 26, 2026. It is now read-only.
This repository was archived by the owner on Aug 26, 2026. It is now read-only.

Use substring instead of replaceFirst in OAuth2AuthorizationConsent #1222

Closed

Description

@heartape

Expected Behavior
Will bring 40 times the performance improvement

Current Behavior

Context
Recently, I have been studying the source code of this framework, and during this period, I have discovered some code that may have optimization value. such as:
https://github.com/spring-projects/spring-authorization-server/blob/878a75d6ed4a2f848316245d91fc55c774070d81/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/OAuth2AuthorizationConsent.java#L96
I conducted a simple test and achieved a 40 times performance improvement.

Activity

  1. changed the title [-]Using substring instead of replaceFirst[/-] [+]Use substring instead of replaceFirst in OAuth2AuthorizationConsent[/+] on May 29, 2023
  2. added this to the 1.1.1 milestone on May 29, 2023
  3. added a commit that references this issue on Oct 2, 2023
    219ef93
  4. added a commit that references this issue on Feb 19, 2024
    a731811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions