My reccomended best practices for speed:
Reduce your data set as quickly and with as few logical functions as possible.
-Filter by phase before area > 0 but less than 100.
Don’t use three logic nodes if you can do it with one.
- And functions make this possible
Ask for something already known and stored in the database instead of asking for customized calculations.
- Good: What is your hosed level
- Bad: get me that geometry, and tell me which level elevation is closet to it’a minimum point, and then return the name of the level which matches that elevation.
Use simple logic functions instead of complicated ones.
- BoundingBox.Intersects is faster than Geometry.Intersects
My beliefs Based on observations not proven in any legitimate scientific method:
Minimize the amount of data which is stored in RAM
- Meaning one node with a 3 second calculation will perform faster on repeated runs than 3 standard or custom nodes with 1 second run times. This appears to be due to the fact that dynamo saves the previous calculation results in the ram (notice how fast ctrl+z regenerates the results for that graph that took 90 seconds to calculate before).
Nested functions feel like they preform faster than loose functions
One code block line stating List.First(List.FilterByBoolMask(items,Element.GetParameterByName(items,“Number”)>10)); feels faster than calling and defining results of each section of code individually.
I haven’t tried defining functions in code blocks with large datasets so they may be further time savers.
Those last too have lean towards the following in terms of processing time from fastest to slowest:
3) Nested Custom Nodes