spring-projects / spring-projects/spring-security
Improve AbstractSecurityExpressionHandler performance
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Summary
AbstractSecurityExpressionHandler creates new StandardEvaluationContext instances over and over, thus leading to a performance penalty in WebExpressionVoter that could be avoided imho. See https://jira.spring.io/browse/SPR-16942 and its linked tickets for more information.
Actual Behavior
AbstractSecurityExpressionHandler creates new StandardEvaluationContext instances over and over.
Expected Behavior
EvaluationContext instances are cached and the use of SimpleEvaluationContext is considered (if applicable).
Versions
This affects the 4.2.x mainline, but presumably 5.x as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AbstractSecurityExpressionHandler and trace how WebExpressionVoter obtains StandardEvaluationContext instances. Compare the expected caching behavior with the possible use of SimpleEvaluationContext, using the linked JIRA tickets for context; the work is done when the repeated context creation is addressed and the relevant behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100