AnsweredAssumed Answered

AFEventFrame.ReferenceElements Very Slow ?

Question asked by redabakr on Apr 12, 2015
Latest reply on Apr 13, 2015 by Eugene Lee


I have a list of AFElements and I want to get Event frames for each AFElement in the list



AFstructure like that :

parent   ---> EventFramesList  contains event frames underneath parent element

afElements ---> Elements underneath parent Element




my code :

AFEventFrame.LoadEventFrames(EventFramesList);

AFEventFrame.LoadEventFramesToDepth(EventFramesList, false, 2, 99999);

foreach(AFElement element in afElements)

{

List<AFEventFrame> ElementEventFramess = EventFramesList.Where(x => x.ReferencedElements != null && x.ReferencedElements.Contains(element)).ToList()

}

 

when i use the following line instead :

List<AFEventFrame> ElementEventFramess = EventFramesList.Where(x => x.PrimaryReferencedElement != null && x.PrimaryReferencedElement.Parent == element).ToList();

 

it sounds faster but still slow !!! any help ?

thanks ,

Outcomes