Tune up your Graph!

 

Have you ever created a graph that all of a sudden runs really slowly, but you don’t know what part is causing the issue? Do you want to understand how long each single node takes to run? Do you want to see how long your entire graph took to execute? Then look no further as today marks the day we release TuneUp, our brand new profiling extension that answers the questions above and more!

 

So what is TuneUp and why is it useful?

TuneUp is a profiling extension that logs how long each node takes to run and expresses that information in the Dynamo Sidebar. Capturing the runtime of nodes in TuneUp has been built on the back of work done in early 2019 to understand what affect that changes we make to Dynamo have on the performance of the overall system. We use these profiling operations internally to make sure that Dynamo gets faster, more performant and more streamlined over time – and we wanted to build an extension that allowed you, the graph creators, to have the exact same potential with your graphs!

Basically, we wanted to share the awesomeness that understanding brings in allowing you to target the inefficiencies in your graph creation, and this allows you to:

  • Hone in on problem areas to build more efficient graphs
  • Understand what kind of operations take a longer time to execute
  • See the overall execution time of your entire graph
  • Explore how delta-compute functions inside of Dynamo

 

Ok you sold me, so where can I get TuneUp from and what versions of Dynamo does it work with?

TuneUp is accessible on the Package Manager when you search for TuneUp for the release of our MVP (Minimum viable product).

TuneUp on the Package Manager

 

TuneUp is available from Dynamo version 2.5 onwards as it requires access to new API features which are not available in prior releases of Dynamo.

 

Great, so now I have TuneUp installed… Where can I find it?

You can find the TuneUp extension under the view menu and after selecting the menu item, TuneUp will appear in the right hand Sidebar window and contains a bunch of features which we will go through in a minute.

  1. The location of TuneUp, accessible via theView menu and then selecting: Show TuneUp
  2. The TuneUp extension, housed in the sidebar panel

 

How to find the TuneUp Extension

I’ve found TuneUp! Hurrah. Now can you please tell me what I’m looking at and what each bit does?

TuneUp contains a bunch of puzzle pieces designed to give you understand in how your graph is performing on a node by node basis. It is textual in nature (We have longer-term plans of making it interactive in-canvas too!) and ranks the execution of nodes based on execution order, labels how long each node took to run, and visually showcases how Dynamo utilizes delta-compute*.

  1. This is the Force Re-execute button. It will allow you to forcefully mark every single node in the graph as dirty (Which simply means – make it run again when you click run) and then re-execute the entire graph. A lot of people have been asking for this execution model for a long time – so go nuts with it!
  2. This bucket of nodes have been Executed on the Current Run* – which simply means your computer used some of it’s power to calculate them on the last clicked run operation.
  3. Under the column of Hashtag (#), you get a ranked order of execution for each of your nodes. If you were to step through the Dynamo graph as it executed each node, then this is the order it does it in!
  4. This bucket of nodes have been Executed on the Previous Run* – which means Dynamo did not re-execute these nodes when you last hit the run button.
  5. The Name column is the names of each node so you can quickly identify what kind of nodes are performing well, and those which are not.
  6. You can select any node in this list – and it will zoom to fit on that node in your graph, taking you directly to the scene of the (performance) crime! Easy forensics.
  7. The Total Graph Execution Time will sum up the per node execution times to give you a total graph runtime operation! Now you can find out exactly how long each graph took to run. This will sum both the run modes available to product total graph execution time; Current Run and Previous Run.
  8. The Execution Time On Current Run (ms) column will showcase how long the sum of the Current Run nodes took to execute in milliseconds (Used instead of seconds as some nodes really do execute super quickly!).
  9. The Execution Time (ms) column will showcase how long each node took to execute, again in milliseconds.
  10. The Execution Time On Previous Run (ms) column will showcase how long the sum of the Previous Run nodes took to execute in milliseconds (Used instead of seconds as some nodes really do execute super quickly!).

If you select any of these column heads you can organize your results sequentially, either in natural sorting or it’s inverse in order to better interrogate the results of your graph run. Boundless options!

*Dynamo uses delta-compute in order to make graphs perform more efficiently. If a node doesn’t have any of it’s input data changing, then Dynamo will simply keep the last output data from that node rather than recalculate that particular node. This means, at any given time, only the sequence of nodes with any changing data will be executed and that data subsequently propagated downstream, thus saving on computing power and speeding up your overall graph execution time. Awesome stuff! You save on system resources and Dynamo runs faster – it’s a win win.

 

TuneUp Components

Cool stuff, but did you add any Extension Developer goodies in this work?

Indeed we gave a little love to the Dynamo developer community too! TuneUp as an extension with it’s own repository on Github and is intended to demonstrate best practise on how to build an Extension for Dynamo Developers. Through TuneUp you can learn about the IViewExtensionsNode Models, View Model, and for the first time from us how to create Tests for an Extension.

TuneUp Github repository contents

TuneUp is super cool, but I have some Wishlist items. Where can I submit those?

In the future, we are planning on putting this product out-of-the-box but are looking to all of you for feedback! What works well? What doesn’t work well? What else could we add? Please provide feedback directly to the TuneUp repo as shown below:

TuneUp Github repository – Issues registry

  1. Click on the Issues tab
  2. Select the New issue button
  3. Provide feedback with a relevant title (i.e “[Wish] I wish TuneUp could do…”, or “[BUG] TuneUp breaks when…”)

I’m on board and excited for the future of TuneUp – So what does that look like?

We have plans to continue working on TuneUp to add more functionality in a second development phase (Details about this are yet to be finalized… but you can check out the TuneUp Github Repo for ideas on what we are investigating! Ooh shiny things.) and eventually have Dynamo consume the extension and ship it out-of-the-box.

Please provide feedback on the Extension on our dedicated Feedback Request Forum Post as we seek to improve this feature.

The wrap

We hope you download, play with, enjoy, use and provide feedback on our newest Extension to Dynamo! A big shout-out to the Dynamo team for all the development and implementation of TuneUp and in particular Scott Mitchell for putting in the hard yards on TuneUp’s design and initial implementation.

 

The Dynamo Team