AnsweredAssumed Answered

Get children of a node faster

Question asked by spilby on Aug 17, 2015
Latest reply on Nov 13, 2015 by aweber1nj
I'm using the alfresco api on my Java backed webscript. I have an uuid, and I do a new NodeRef with this uuid and then I use getChildAssoc from nodeService to obtain all the direct child nodes.

NodeRef nodeRef = new NodeRef("workspace://SpacesStore/" + uuid);
List<ChildAssociationRef> childRefList = new ArrayList<ChildAssociationRef>();
    childRefList = getNodeService().getChildAssocs(nodeRef);

for (ChildAssociationRef childRef : childRefList) {
    NodeRef nodeChildRef = childRef.getChildRef();

But on folders with more than 100 subfolders it takes too long. Are there another quicky way to obtain all direct children of a node? The fastest method you know to do that.