Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-491

Improve ManagedAuditLoggerImpl.log() performance when disabled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 1.0.0.Alpha16
    • 1.0.0.Alpha15
    • Management
    • None

      org.jboss.as.controller.audit.ManagedAuditLoggerImpl.log/logJmxMethodAccess() does some work such as creating the log item which will just be thrown away if getLoggerStatus()==DISABLED.

      It may be worth checking if that is the case and skipping the work that will not be needed. If it was not for the applyHandlerUpdates() call, I think an "isDisabled" volatile flag could be used to avoid taking the lock at all there, which can be expensive due to it being a fair lock.

      This does not appear to show up as a issue unless you are performing a lot (thousands) of management operations in quick succession.

            rhn-support-jlivings James Livingston (Inactive)
            rhn-support-jlivings James Livingston (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: