mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Minor performance tweak (for single-tenant mode) as per KR's profiling test
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6729 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -336,12 +336,16 @@ public class DictionaryDAOImpl implements DictionaryDAO
|
|||||||
* @return mapped models
|
* @return mapped models
|
||||||
*/
|
*/
|
||||||
private List<CompiledModel> getModelsForUri(String uri)
|
private List<CompiledModel> getModelsForUri(String uri)
|
||||||
|
{
|
||||||
|
if (tenantService.isEnabled())
|
||||||
{
|
{
|
||||||
// note: special case, if running as System - e.g. addAuditAspect
|
// note: special case, if running as System - e.g. addAuditAspect
|
||||||
String currentUserName = AuthenticationUtil.getCurrentUserName();
|
String currentUserName = AuthenticationUtil.getCurrentUserName();
|
||||||
|
|
||||||
if ((tenantService.isTenantUser()) ||
|
if (currentUserName != null)
|
||||||
(tenantService.isTenantName(uri) && (currentUserName != null) && (currentUserName.equals(AuthenticationUtil.getSystemUserName()))))
|
{
|
||||||
|
if ((tenantService.isTenantUser(currentUserName)) ||
|
||||||
|
(currentUserName.equals(AuthenticationUtil.getSystemUserName()) && tenantService.isTenantName(uri)))
|
||||||
{
|
{
|
||||||
String tenantDomain = null;
|
String tenantDomain = null;
|
||||||
if (currentUserName.equals(AuthenticationUtil.getSystemUserName()))
|
if (currentUserName.equals(AuthenticationUtil.getSystemUserName()))
|
||||||
@@ -391,8 +395,9 @@ public class DictionaryDAOImpl implements DictionaryDAO
|
|||||||
}
|
}
|
||||||
return models;
|
return models;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
|
|
||||||
List<CompiledModel> models = getUriToModels().get(uri);
|
List<CompiledModel> models = getUriToModels().get(uri);
|
||||||
if (models == null)
|
if (models == null)
|
||||||
{
|
{
|
||||||
@@ -400,7 +405,6 @@ public class DictionaryDAOImpl implements DictionaryDAO
|
|||||||
}
|
}
|
||||||
return models;
|
return models;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user