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

Optimize MMR logic within DiscardAttributeChecker.DEFAULT_VALUE

    Details

      Description

      See:

      https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/registry/AbstractResourceRegistration.java#L172

      https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/registry/AbstractResourceRegistration.java#L209

      Basically, in order to deal with the possibility of override registrations, calls to an MRR typically result in it internally working up to the root of the MRR tree and then walking back down to the target address. So this:

      ImmutableManagementResourceRegistration registration = context.getResourceRegistrationFromRoot(address);
      AttributeDefinition definition = registration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName).getAttributeDefinition();
      

      is less efficient than:

      ImmutableManagementResourceRegistration registration = context.getResourceRegistrationFromRoot(PathAddress.EMPTY_ADDRESS);
      AttributeDefinition definition = registration.getAttributeAccess(address, attributeName).getAttributeDefinition();
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pferraro Paul Ferraro
                  Reporter:
                  pferraro Paul Ferraro
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: