. 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

@@ -308,7 +308,26 @@ public interface FileFolderService
*/
@Auditable(parameters = {"nodeRef"})
public void delete(NodeRef nodeRef);
/**
* Get the file or folder information from the root down to and including the node provided.
* <ul>
* <li>The root node can be of any type and is not included in the path list.</li>
* <li>Only the primary path is considered. If the target node is not a descendant of the
* root along purely primary associations, then an exception is generated.</li>
* <li>If an invalid type is encountered along the path, then an exception is generated.</li>
* </ul>
*
* @param rootNodeRef the start of the returned path, or null if the <b>store</b> root
* node must be assumed.
* @param nodeRef a reference to the file or folder
* @return Returns a list of file/folder infos from the root (excluded) down to and
* including the destination file or folder
* @throws FileNotFoundException if the node could not be found
*/
@Auditable(parameters = {"rootNodeRef", "nodeRef"})
public List<FileInfo> getNamePath(NodeRef rootNodeRef, NodeRef nodeRef) throws FileNotFoundException;
/**
* Get the file or folder names from the root down to and including the node provided.
* <ul>
@@ -319,14 +338,14 @@ public interface FileFolderService
* </ul>
*
* @param rootNodeRef the start of the returned path, or null if the <b>store</b> root
* node must be assumed.
* node must be assumed.
* @param nodeRef a reference to the file or folder
* @return Returns a list of file/folder infos from the root (excluded) down to and
* including the destination file or folder
* @return Returns a list of file/folder names from the root (excluded) down to and
* including the destination file or folder
* @throws FileNotFoundException if the node could not be found
*/
@Auditable(parameters = {"rootNodeRef", "nodeRef"})
public List<FileInfo> getNamePath(NodeRef rootNodeRef, NodeRef nodeRef) throws FileNotFoundException;
public List<String> getNameOnlyPath(NodeRef rootNodeRef, NodeRef nodeRef) throws FileNotFoundException;
/**
* Resolve a file or folder name path from a given root node down to the final node.