Skip to content

Improve AbstractSecurityExpressionHandler performance #5622

@dreis2211

Description

@dreis2211

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreAn issue in spring-security-coretype: enhancementA general enhancement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions