Speed Placing Instances With vs Without Nested Element

Speed Placing Instances With vs Without Nested Element

TheRealChrisHildebran
Advocate Advocate
659 Views
6 Replies
Message 1 of 7

Speed Placing Instances With vs Without Nested Element

TheRealChrisHildebran
Advocate
Advocate

Greetings all, im building a tool for our company that will place multiple(100+) new instances of a Family (Generic Model) which has a nested Element (Generic Model). 

 

The nested element is Shared which is a requirement of the Use Case.

 

The code is working fine; my problem is that, through testing, ive discovered that the time to place these instances is remarkable greater when a nested element is present.

 

The Family is loaded in the Project(s) so, i believe, there are no loading issues to consider.

 

Comparision Of Speed - With/Without Nested Element

  • 144 Elements With Nested Element - 185.823 Seconds (1.29 Seconds Per element)
  • 144 Elements Without Nested Element - 1.713 Seconds (.007 Seconds Per Element)

Have any of you run across this and have a solution for it?

 

 

Full testing results.

2019-05-07_8-49-12.png

0 Likes
660 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Dear Chris,

 

Thank you for your interesting query and benchmark results.

 

Is there any chance you could recreate the code and sample family definitions in the shape of a non-confidential minimal reproducible case that I can share with the development team?

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

In that case, they could analyse and debug to see where the bottleneck arises.

 

Furthermore, is there any way you could perform the same benchmarking, more or less, manually, through the user interface, with no API usage?

 

I suspect the results will be similar.

 

That would prove that this is not an API issue, but built-in behaviour of Revit itself.

 

In that case, you might also obtain some more experienced feedback on the topic of the speed of nested family instance placement in the non-API forums, e.g., the Revit Architecture forum.

 

Thank you!

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 7

TheRealChrisHildebran
Advocate
Advocate

Jeremy, thank you for taking notice of this issue and being willing to look deeper!

 

Regarding reproducing the behavior in Revit. I dont believe there is a way to place the multitudes of instances id like to place using the "Out Of The Box" user interface.

 

Placing one at a time doesnt "seem" to be slow but it may actually take the same amount of time per instance as i found in my testing. ~1.25 seconds.

 

An array isnt helpful as the intervals between gridlines frequently vary within a project.

 

So, I will prepare a solution with only the required code as well as the Family in question this morning (Portland, Oregon) and attach them to this thread unless you think another channel would be better.

 

Regards, Chris Hildebran

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

Fully agree! Yes, that sounds perfect. Thank you!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 7

TheRealChrisHildebran
Advocate
Advocate

Jeremy, ive attached a ZIP file(20190508_KTR.zip) containing the solution ready to be compiled along with an addin manifest. Ive also attached the Family(Grid Point.rfa) with the Nested/shared element contained within it.

 

I did perform an additional speed test by (except gridlines) deleting all instances in the Project ive been working in. Then running the Placer Tool. The speed to place 144 point in this test was quite acceptable. 

 

So, perhaps there is a connection there.

 

In case you need to examine them ive put the previously mentioned Project files on Dropbox (link).  

 

Regard, Chris Hildebran

0 Likes
Message 6 of 7

jeremytammik
Autodesk
Autodesk

Thank you very much, all successfully received.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 7

jeremytammik
Autodesk
Autodesk

Dear Chris,

 

Thank you for all your material and reproducible case.

 

I logged the issue REVIT-148845 [API: significant slowdown placing instances with vs without nested element -- 15343241] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.

 

This issue is important to me. What can I do to help?

 

This issue needs to be assessed by our engineering team and prioritised against all other outstanding change requests. Any information that you can provide to influence this assessment will help. Please provide the following where possible:

 

  • Impact on your application and/or your development.
  • The number of users affected.
  • The potential revenue impact to you.
  • The potential revenue impact to Autodesk.
  • Realistic timescale over which a fix would help you.
  • In the case of a request for a new feature or a feature enhancement, please also provide detailed Use cases for the workflows that this change would address.

 

This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact items. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes