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

Optimize MMR logic within DiscardAttributeChecker.DEFAULT_VALUE

XMLWordPrintable

      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();
      

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: