]
Paul Ferraro updated WFCORE-4918:
---------------------------------
Summary: Optimize MMR logic within DiscardAttributeChecker.DEFAULT_VALUE (was:
Optimize MMR logic within DiscardAttributeChecker.DEFAULT)
Optimize MMR logic within DiscardAttributeChecker.DEFAULT_VALUE
---------------------------------------------------------------
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
Priority: Major
See:
https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/j...
https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/j...
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}