Drag and drop python components to Grasshopper canvas takes long time

Hi,

When I drag and drop .ghuser objects written as python components for a first time, it takes really long time. The second time I run, it runs on a normal speed.

Is there any way to avoid or speed it up ?


folding_diamonds.ghuser (6.6 KB)

Probably not, this is most likely the just-in-time compilation that needs to run once.

1 Like

Is then a way to compile the python components as done for csharp?

Hi @Petras_Vestartas ,
Yes, they can be compiled to .ghpy files:

But the source code needs to be slightly revised.

1 Like

This is great than you I will try to follow the instructions :slight_smile:

1 Like

Giulio deserves all the credit for such a nice tutorial :slight_smile:

An experience with .ghpy files is that I got some error at the beginning of the Grasshopper loading. The error appears because my .ghpy files are conflicting with some other .ghpy plugin. I don’t remember exactly what the error was, but I remember that I never had such an error with .ghuser files. The error went away, by deleting that other .ghpy plugin (downloaded from food4rhino).

In the end this experience of mine is few years old, so it may be that you won’t get it now. Or maybe I did something wrong back then.

Can it be the case of the having the same GUID of the plugin that was used in the other plugin?

Maybe. I don’t recall to be honest. I just remember the problem went away when I deleted the other .ghpy based plugin.