Creating assembly vs. AddingmeberIds

Creating assembly vs. AddingmeberIds

BardiaJahan
Advocate Advocate
357 Views
1 Reply
Message 1 of 2

Creating assembly vs. AddingmeberIds

BardiaJahan
Advocate
Advocate

Hi all,

 

A section of my plugin iterates through some objects, and creates an assembly containing those passed a condition. I am wondering if, in terms of efficiency, there is a big difference between  1- retrieving the elements and creating the assembly at the end vs. 2- Creating the assembly and adding elements to it one by one in each iteration (using AddMemberIds method)?

0 Likes
358 Views
1 Reply
Reply (1)
Message 2 of 2

sobon.konrad
Advocate
Advocate

Are you able to post an example of your code. That way we can better asses what looks more efficient. Are you opening multiple transactions. Are you looping through the elements collection multiple times. etc etc. These are all questions we can't answer when you don't post a valid minimal example. 

Cheers! 

0 Likes