Spring Security
  1. Spring Security
  2. SEC-1423

Inefficient Pointcut Expression parsing in ProtectPointcutPostProcessor.java

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3, 3.1.0.M1
    • Component/s: Core
    • Labels:
      None

      Description

      The ProtectPointcutPostProcessor.postProcessBeforeInitialization method parses each pointcut expression for each method of the present bean until it finds a match, which is highly inefficient.

      The parsed pointcutExpressions can be cached in a LinkedHashSet when the pointcut is added ( see patch ), thus avoiding the parsing of the same expression for each method of the current bean.

        Activity

        Hide
        Luke Taylor added a comment -

        Good idea. I've updated the code to add caching for both 3.1.x and 3.0.x.

        Show
        Luke Taylor added a comment - Good idea. I've updated the code to add caching for both 3.1.x and 3.0.x.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Tudor Malene
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: