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

Paul Ferraro (Jira) issues at jboss.org
Mon Apr 13 11:49:34 EDT 2020


Paul Ferraro created WFCORE-4918:
------------------------------------

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


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