algorithmic modeling for Rhino
Tags:
Hmm... since you said this is a scripting component, not a custom component, then I think that would depend on how David is dealing with referenced assemblies in scripting components. Basically, when you compile code into a dll, it gets compiled into IL (intermediate language), which is the common denominator between all the .Net languages and is what the .Net framework actually uses to create assembly/processor instructions at run time.
This process of taking the IL and compiling it into code that's usable by the computer is called JIT, or just in time compiling. This process does take a little time, but for most code within the managed environment, this happens once when the assembly is initially loaded, and then it stays in memory, so that performance hit isn't seen on subsequent runs. What may possibly be happening here is that each time the scripting component is run, the assembly is loaded, compiled, used within your script, then unloaded. If that is the case, then subsequent runs of the component would not benefit from the assembly already being loaded/compiled. I guess we'll need more word on exactly how these referenced assemblies are being handled.
If they are being loaded and unloaded with each scripts execution, there is the capability to "precompile" the IL into a native dll. This would save some time, although the code that is created by the "precompiled" dll is not optimal because things like processor architecture (x86 vs x64), memory locations, etc are not known. In this case though, I would imagine that it would offer some performance benefit though.
Hi Dave,
slower overall or slower only the first time? Compiling a VB/C# script takes longer if there are special references, but once compiled there should be no difference.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Odd, it's actually impossible to unload a dll from an AppDomain in .NET so whatever is causing the slowdown, it is certainly not due to a continuous reloading of a dll. I'll run some tests once I have the Ants profilers installed again.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I've used an older version, and was never a very advanced user, but I liked it a lot.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Ok thanks. Glad it worked out :) Could it be that you compiled the referenced dll as DEBUG first and as RELEASE second? That might explain a difference in performance.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by