referenced dll - Grasshopper2024-03-29T14:24:21Zhttps://www.grasshopper3d.com/forum/topics/referenced-dll?feed=yes&xn_auth=noI've used an older version, a…tag:www.grasshopper3d.com,2011-03-11:2985220:Comment:1819152011-03-11T10:45:59.760ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>I've used an older version, and was never a very advanced user, but I liked it a lot.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p>I've used an older version, and was never a very advanced user, but I liked it a lot.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p> Didn't know that one. Thanks…tag:www.grasshopper3d.com,2011-03-11:2985220:Comment:1809532011-03-11T03:50:30.527ZDamien Alomarhttps://www.grasshopper3d.com/profile/DamienAlomar
Didn't know that one. Thanks for the extra info. Let me know how useful that Ants profiler is. I was looking at it today. The price tag is probably a little too steep for my budget though.
Didn't know that one. Thanks for the extra info. Let me know how useful that Ants profiler is. I was looking at it today. The price tag is probably a little too steep for my budget though. Ok thanks. Glad it worked out…tag:www.grasshopper3d.com,2011-03-11:2985220:Comment:1809482011-03-11T00:41:58.100ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>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.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p>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.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p> Just an update.After streamli…tag:www.grasshopper3d.com,2011-03-11:2985220:Comment:1812312011-03-11T00:35:14.411ZDavid Reeveshttps://www.grasshopper3d.com/profile/DavidReeves
Just an update.<br/>After streamlining some of the code it seems to have mysteriously sorted itself out. The two components are running identically. I'm not exactly sure what was causing it in the first place but I'd hate to send you on a wild goose chase David. I'll let you know if I run into it again.
Just an update.<br/>After streamlining some of the code it seems to have mysteriously sorted itself out. The two components are running identically. I'm not exactly sure what was causing it in the first place but I'd hate to send you on a wild goose chase David. I'll let you know if I run into it again. Odd, it's actually impossible…tag:www.grasshopper3d.com,2011-03-10:2985220:Comment:1811532011-03-10T22:36:10.066ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>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.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p>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.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p> Hi David, Slower overall. It'…tag:www.grasshopper3d.com,2011-03-10:2985220:Comment:1811352011-03-10T20:58:34.991ZDavid Reeveshttps://www.grasshopper3d.com/profile/DavidReeves
Hi David, <br/>Slower overall. It's pretty consistent about it, solving each iteration at about half speed.
Hi David, <br/>Slower overall. It's pretty consistent about it, solving each iteration at about half speed. Hi Dave,
slower overall or…tag:www.grasshopper3d.com,2011-03-10:2985220:Comment:1801942011-03-10T12:37:49.022ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>Hi Dave,</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p>Hi Dave,</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p> Thanks Damien. Very Informati…tag:www.grasshopper3d.com,2011-03-10:2985220:Comment:1802762011-03-10T11:19:25.131ZDavid Reeveshttps://www.grasshopper3d.com/profile/DavidReeves
Thanks Damien. Very Informative. The script component in question is rigged up to a timer and holds geometry between solutions in some additional shared Script_Instance members. I added some extra junk within both components to see how the time differential changes when things slow down. It seems like the component with the reference is always running around half speed. Does this sound symptomatic of the loading/unloading scenario?
Thanks Damien. Very Informative. The script component in question is rigged up to a timer and holds geometry between solutions in some additional shared Script_Instance members. I added some extra junk within both components to see how the time differential changes when things slow down. It seems like the component with the reference is always running around half speed. Does this sound symptomatic of the loading/unloading scenario? Hmm... since you said this is…tag:www.grasshopper3d.com,2011-03-09:2985220:Comment:1799192011-03-09T23:03:53.531ZDamien Alomarhttps://www.grasshopper3d.com/profile/DamienAlomar
<p>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.</p>
<p> </p>
<p>This process of taking the IL and…</p>
<p>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.</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>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.</p>