Uploaded image for project: 'HERAS-AF XACML Core'
  1. XACMLCORE-185

Debug logging triggers unnecessary JAXB marshaling which leads to a significant performance degradation in several places

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 1.0.0-M1, 1.0.0-M2
    • Fix versions: 1.0.0.M3
    • Components: PDP
    • Labels:
    • Environment:

      n/a

    • Number of Attachments:
      1
    • Number of Comments:
      1
    • Sprint:

      Description

      org.herasaf.xacml.core.simplePDP.SimplePDP.evaluate, line 161 in 1.0.0-M2 always calls request.toString(), even when debug logging is not enabled.

      Fix suggestion: change the statement to:
      logger.debug("Evaluating Request: {}", request);

      request.toString() will now only be invoked if debug logging is enabled.

      In our simple performance test, we were able to reduce the time to evaluate a request from 150ns to 40ns after making this change (on a normal log level).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              walco Walco van Loon
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes Time Not Required
                15m