Large Project - Dynamo Performance

Dear Experts,
What kind of practice to apply in order to get faster performance through dynamo tasks at the large projects.
As an option i tried to use workset function. However realized that all elements (closed workset elements as well) still showing in the dynamo and trying to handle them as well leading very bad performance.
Your expert suggestion will be highly appreciated.

More elements will always take longer than less, no way to avoid that really.

Collect minimum number of elements (e.g. avoid getting all elements in active view and then filtering it down). As well as this explore python and filtered element collectors, you can sometimes collect elements quite efficiently using these versus using heaps of nodes to achieve the same outcome.

3 Likes

Use TuneUp package. You’ll get many thoughts. Divide things you cant change(revit iteraction) and others. Post specific quetstions here, we’ll help.

2 Likes

Dear Vladimir, Please find screenshots of results:

  • We have 30283 elements
  • List.SortbyKey takes 4504 (75 min) sec to make its job :frowning:


Well one thing I think could speed you up would be to create a dictionary from from your code block and just look for a single item. Right now you are potentially iterating items 20+ times when you just need a single value.

I would also say that the GetParam node before that could just be the OOTB unless you at jumping between Types / Instance params. It could simplify the List / Dictionary creation and processing.

Also, it is hard to tell from the small portion of your graph, but there are several different groupings that are taking a long time. See if you can arrange / use those in series so your not duplicating that process multiple times on the same data set.

2 Likes

100% this. I would not use the TypeOrInstance node from rhythm if you know what kind of parameter you want. Because that performs a search of both parameter types (type and instance).

The node Element.GetParameterValueByNameTypeOrInstance was meant as more of an exploratory node for when you aren’t completely sure what kind of parameter you are wanting to get at. I would not recommend using it when you can easily find out what kind of parameter you should be targeting

4 Likes

@kvusal

Try Group by Key at first. (you just breaking sorted 30000 items with grouping).
Than sort list of groups with sorted group keys. Or better create and use dictionary. It can speed up things a lot.

If System Abbreviation is Bult-in parameter, try to use Bultin parameters nodes from Archilab package.
Avoid Index of, List.Combine. Try to use simple [a,b].