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

Cache Annotation Lookups #15799

Closed
jzheaux opened this issue Sep 12, 2024 · 0 comments
Closed

Cache Annotation Lookups #15799

jzheaux opened this issue Sep 12, 2024 · 0 comments
Assignees
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Sep 12, 2024

Several Security components use SecurityAnnotationScanners to look for annotations and apply Security's expression template support and enforce its uniqueness constraints.

Given that this is used by a number of method interceptors and AOT hints, it would be nice if the found merged annotations were cached. Indeed, the JavaDoc encourages this:

/**
  * Since the process of synthesizing an annotation can be expensive, it's recommended to
  * cache the synthesized annotation to prevent multiple computations.
  */
@jzheaux jzheaux added in: core An issue in spring-security-core type: enhancement A general enhancement labels Sep 12, 2024
@jzheaux jzheaux added this to the 6.4.0-M4 milestone Sep 12, 2024
@jzheaux jzheaux self-assigned this Sep 12, 2024
kse-music added a commit to kse-music/spring-security that referenced this issue Sep 13, 2024
kse-music added a commit to kse-music/spring-security that referenced this issue Sep 13, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant