spring-projects / spring-projects/spring-security

Improve AbstractSecurityExpressionHandler performance

Open
#5,622 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: core type: enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.