<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Performance issues - getChildAssocs alternatives in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298017#M251147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Roger thank you for your suggestion…i'm trying to use getChildAssocs as follow but without success:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Set&amp;lt;QName&amp;gt; types = new HashSet&amp;lt;QName&amp;gt;(1, 1.0f);&lt;BR /&gt;types.add(ContentModel.TYPE_CONTENT);&lt;BR /&gt;List&amp;lt;ChildAssociationRef&amp;gt; filesFolderList = nodeService.getChildAssocs(parentNodeRef, types);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it returns me zero results neither files nor folders…&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 14:22:00 GMT</pubDate>
    <dc:creator>dave984</dc:creator>
    <dc:date>2014-08-29T14:22:00Z</dc:date>
    <item>
      <title>Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298013#M251143</link>
      <description>Hi all, referring to the Alfresco NodeRef cookbook i retrieve all the files existing in a folder in this way:List&amp;lt;ChildAssociationRef&amp;gt; filesFolderList = nodeService.getChildAssocs(folderNodeRef);for (ChildAssociationRef file : filesFolderList) {&amp;nbsp; NodeRef childRef = file.getChildRef();&amp;nbsp; FileInf</description>
      <pubDate>Thu, 28 Aug 2014 10:24:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298013#M251143</guid>
      <dc:creator>dave984</dc:creator>
      <dc:date>2014-08-28T10:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298014#M251144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the problem is not really with getChildAssocs but your use of it. For one thing, it is very expensive to call getFileInfo before you have even checked the aspect - moving this inside of the then-block of the if-clause should improve performance quite a bit. Also, there are overloaded variants of getChildAssocs() that you could use e.g. if you want to look for specific association types or names - of course that requires you to actually have some distinct association types and not just use cm:contains.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If transactional consistency is not of concern to you, you could also use a FTS query with PATH and ASPECT selectors (via SearchService) to retrieve the relevant files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the end, you should also ask yourself the question if it is wise to have 1500 files in one folder when you need to retrieve some of them using a condition that cannot be easily checked during iteration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 10:51:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298014#M251144</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2014-08-29T10:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298015#M251145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Axel thank you for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm really sorry, i minimized the if-clause beacause i didn't think getFileInfo could be so expensive. I edited my initial question with the full if-clause…what do you think now?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Transactional consistency is important for what i'm doing so i cannot use a Lucene Query…&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 11:19:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298015#M251145</guid>
      <dc:creator>dave984</dc:creator>
      <dc:date>2014-08-29T11:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298016#M251146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This version of the getChildAssocs(NodeRef nodeRef, Set&amp;lt;QName&amp;gt; childNodeTypeQNames);&amp;nbsp; could help by filtering out folders before you get them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And you may be able to use the search service for database backed queries.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 11:57:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298016#M251146</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-08-29T11:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298017#M251147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Roger thank you for your suggestion…i'm trying to use getChildAssocs as follow but without success:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Set&amp;lt;QName&amp;gt; types = new HashSet&amp;lt;QName&amp;gt;(1, 1.0f);&lt;BR /&gt;types.add(ContentModel.TYPE_CONTENT);&lt;BR /&gt;List&amp;lt;ChildAssociationRef&amp;gt; filesFolderList = nodeService.getChildAssocs(parentNodeRef, types);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it returns me zero results neither files nor folders…&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 14:22:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298017#M251147</guid>
      <dc:creator>dave984</dc:creator>
      <dc:date>2014-08-29T14:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298018#M251148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Someone knows how to use getChildAssocs(NodeRef nodeRef, Set childNodeTypeQNames); ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My code returns 0 elements in the folder and that's not right of course!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 11:41:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298018#M251148</guid>
      <dc:creator>dave984</dc:creator>
      <dc:date>2014-09-01T11:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issues - getChildAssocs alternatives</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298019#M251149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you sure that inside your parentNodeRef folder, all are content types. If you have deployed your custom model, then there can be custom content types present inside it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 17:07:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/performance-issues-getchildassocs-alternatives/m-p/298019#M251149</guid>
      <dc:creator>sanket</dc:creator>
      <dc:date>2014-09-01T17:07:15Z</dc:date>
    </item>
  </channel>
</rss>

