[jboss-jira] [JBoss JIRA] (WFCORE-4941) Optimize MMR logic within DiscardAttributeChecker.DEFAULT_VALUE

Paul Ferraro (Jira) issues at jboss.org
Tue Apr 21 15:18:54 EDT 2020


Paul Ferraro created WFCORE-4941:
------------------------------------

             Summary: Optimize MMR logic within DiscardAttributeChecker.DEFAULT_VALUE
                 Key: WFCORE-4941
                 URL: https://issues.redhat.com/browse/WFCORE-4941
             Project: WildFly Core
          Issue Type: Task
          Components: Management
    Affects Versions: 12.0.0.Beta1
            Reporter: Paul Ferraro
            Assignee: Paul Ferraro
             Fix For: 12.0.0.Beta2


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:

{code:java}
ImmutableManagementResourceRegistration registration = context.getResourceRegistrationFromRoot(address);
AttributeDefinition definition = registration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName).getAttributeDefinition();
{code}

is less efficient than:

{code:java}
ImmutableManagementResourceRegistration registration = context.getResourceRegistrationFromRoot(PathAddress.EMPTY_ADDRESS);
AttributeDefinition definition = registration.getAttributeAccess(address, attributeName).getAttributeDefinition();
{code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list