Any memory tips?

I’ve got a graph that fixes up (most of) the Text problems with the 2017 upgrade.
However, I’ve been running it on a large project (> 400 Meg w/ over 10,000 TExt instances) and it’s been running for over 6 hours now.
I believe it’s probably taking that long because my 32 Gig of memory is maxed out.
So, anyone have any ideas how I could reduce the memory footprint of my graph?
Maybe flush out some lists after they are passed to another node or something?

Divide your script into multiple scripts.
One possible approach:
Make one script that does the data collection only - determine which elements need to be altered and store their IDs in an Excel sheet or CSV file. If you have different types of elements that will be altered using different methods send their IDs to different sheets in your Excel file.
Make another script that reads the Excel data and actually alters model elements in the model. Depending on if there are different methods for different types of objects, make one script for each method.
If that doesn’t do the trick, you could set your scipt(s) up in such a way that it/they only ever read(s) a portion of the Excel sheet.
And in case you don’t want to constantly watch Dynamo and wait for it to finish with the script have the script tweet to you or message you on slack once it is finished - there are packages for that kind of thing.

2 Likes

Have you turned off the background preview? the new background text preview is slowing things down a lot.

Dividing the script up is good advice. Also, if you are not using Python or C# then you should consider it (if this is an option) since every node on the graph tesselates and that hammers performance. One of the drawbacks of visual programming is redundancy, so on large graphs this can become crippling. For example, you may find that 10s (maybe even 100s) of nodes can be condensed into a single python script. You also have the option to dispose objects while the script executes, and this may be the silver bullet you are looking for.

The other major drawback with Dynamo is it has no lightweight geometry library, which means every feature is top-level (or to put it another way, all features inherit the full set of attributes, which adds to the profligacy of the file and impacts on memory).

There’s a very useful page on the Dynamo wiki about working with large datasets. It explains the tessellation issue in an easy-to-understand fashion too:

1 Like

I found that when I upgraded to Revit 2017.2 the text problems went away. Have you tried to upgrade?

1 Like

Avoid visualizing large data sets through the bubble preview and watch nodes as described in here:

@ddelarosa - I think the OP is referring to the changed way of how text size is computed in 2017 (https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/Revit-WhatsNew/files/GUID-F57326A0-BCE1-44D6-A5FE-3F084258EE28-htm.html). To my knowledge, that has not changed with any of the subsequent updates (although 2017.2 did fix one particular view-related text scaling issue).