Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66693

Re: Performance difference between Dynamo vs Revit API

$
0
0

Dear Rajesh,

 

Thank you for your query.

 

The Revit API is a .NET API.

 

All access to it is via .NET.

 

Dynamo accesses the normal Revit .NET API via .NET, so it will definitely never be faster than a non-dynamo Revit API add-in.

 

Therefore: Yes, definitely Dynamo and the Revit API work in a same way internally.

 

There is not that much overhead being added either, so Dynamo should also not be very much slower.

 

If your process requires hours to complete, there are to possible causes:

 

  1. That is the amount of time that Revit requires to complete the task.
  2. You have implemented some very inefficient algorithm.

 

Re 1: In the case of 1, there is not much you can do about it.

 

You could (and should!) however run the same steps manually through the user interface to see how long Revit itself requires for each step.

 

If there is no difference, everything is clear.

 

If something can be achieved faster manually, you have some optimisation work to do.

 

Re 2: An inefficient algorithm will probably be more or less equally inefficient in both a native .NET add-in and Dynamo.

 

In either case, you should benchmark your code to determine where the bottlenecks are located and what is causing them.

 

Here is some timer code for benchmarking:

 

http://thebuildingcoder.typepad.com/blog/2012/01/timer-code-for-benchmarking.html

 

Here are some benchmarking samples:

 

http://thebuildingcoder.typepad.com/blog/2010/04/collector-benchmark.html

http://thebuildingcoder.typepad.com/blog/2010/10/level-filter-benchmark.html

http://thebuildingcoder.typepad.com/blog/2010/12/more-kevin-filtering-benchmarks.html

http://thebuildingcoder.typepad.com/blog/2011/01/type-filter-benchmark-update.html

http://thebuildingcoder.typepad.com/blog/2014/04/wpf-fill-pattern-viewer-control-benchmark.html

 

I hope this helps.

 

Best regards,

 

Jeremy


Viewing all articles
Browse latest Browse all 66693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>