. Optimize ApplicationScriptUtils.toJSON() - threadlocal cache for namespace resolution to avoid DD access, smarter retrieval of cm:person properties - 40% quicker or more in some cases

. Convert short qnames to long qnames in our templates to avoid DD access to resolve full qnames
. Optimize out N+1 queries from calling RatingService.getRating() unless the document has at least one Like (which is available in the rolled up property already present on the node) - up to 99% quicker when building "Likes" JSON structure...!
. Added new optimized method to FileFolderService to retrieve a cm:name based path - only the String for each path element not the full FileInfo structure for each (avoid full getProperties() - 70% quicker to build webdav URL
overall before/after to retrieve doclist2 script (8x concurrent threads x25 repeats etc.) Before: 1030ms After: 645ms
Also improves original doclist script (used by dashlets) and single node retrievals.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47448 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2013-03-01 15:43:08 +00:00
parent 380bd69941
commit 3373456c13
9 changed files with 257 additions and 68 deletions

View File

@@ -90,7 +90,7 @@ public class WebDavServiceImpl implements WebDavService
if (getIsContainer(typeName) || getIsDocument(typeName))
{
List<FileInfo> paths = fileFolderService.getNamePath(getRootNode().getNodeForCurrentTenant(), nodeRef);
List<String> paths = fileFolderService.getNameOnlyPath(getRootNode().getNodeForCurrentTenant(), nodeRef);
// build up the webdav url
StringBuilder path = new StringBuilder(128);
@@ -99,7 +99,7 @@ public class WebDavServiceImpl implements WebDavService
for (int i=0; i<paths.size(); i++)
{
path.append("/")
.append(URLEncoder.encode(paths.get(i).getName()));
.append(URLEncoder.encode(paths.get(i)));
}
url = path.toString();
}