AnsweredAssumed Answered

AFElement.FindElements performance problem

Question asked by VarbanVarbanov on Mar 8, 2016
Latest reply on Mar 16, 2016 by bshang

Hi,

 

We use the following method to get AF Elements with AFSdk 2015 and 2012:

 

AFElement.FindElements(afDb, root, matchPattern , AFSearchField.Name, true, AFSortField.Name, AFSortOrder.Ascending, 0, maxCount, out totalElementsCount);

 

And it is signifficantly faster if root is null (i.e search in all AF Db) and much slower if a root element is passed. I'm talking about 50-100 times slower. Such performance is not usable. Logically it should be expected that with root passed the method would be faster because it could be searching in smaller set of assets.


Please, could you tell me what is the reason for this behavior and what to do/use to overcome this problem?

 

Thank you in advance!

Outcomes