mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Dictionary optimisation: improve performance when getting sub classes and property defs
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6825 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -970,6 +970,8 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
|
||||
private Map<QName, Serializable> getPropertiesImpl(Node node) throws InvalidNodeRefException
|
||||
{
|
||||
Map<QName,PropertyDefinition> propDefs = dictionaryService.getPropertyDefs(node.getTypeQName());
|
||||
|
||||
Map<QName, PropertyValue> nodeProperties = node.getProperties();
|
||||
Map<QName, Serializable> ret = new HashMap<QName, Serializable>(nodeProperties.size());
|
||||
// copy values
|
||||
@@ -978,7 +980,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
QName propertyQName = entry.getKey();
|
||||
PropertyValue propertyValue = entry.getValue();
|
||||
// get the property definition
|
||||
PropertyDefinition propertyDef = dictionaryService.getProperty(propertyQName);
|
||||
PropertyDefinition propertyDef = propDefs.get(propertyQName);
|
||||
|
||||
if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.NODE_REF)) &&
|
||||
(propertyValue != null) && (propertyValue.getStringValue() != null))
|
||||
|
Reference in New Issue
Block a user