GhPlayer compiled commands - components reloaded in cache

When I use a grasshopper compiled command it stays in cache. This issue is discussed here for the grasshopperplayer usage.

I found a trick asking grasshopper to load only once another grasshopper, it works well. But it would be nice to have the same behavior (new solution once) for compiled scripts by default. I tried to compile the script in Rhino WIP but the problem persist. It is very annoying to have unexpected behavior from a script hidden in background.

Hi Gaspard -

You never supplied any .gh files for us to look into.
From the screenshot in your previous thread, it looks like you have a Python component that is doing something. I noticed a C# component continuing to work outside the scope of the GrasshopperPlayer command the other day and filed that as RH-65648. I am guessing that’s the same issue as what you are running into.

Apart from that, I also see in that screenshot that you are baking by means of a plug-in and not the standard Context Bake component. If that is somehow involved in what you are seeing, you will have to ask the author of that plug-in about that.
-wim

My bad. I agree that my example is not relevant as I use external plugin.

The issue here is the same as RH-65648 but for compiled script through RhinoScriptCompiler.

I compiled your script in a plugin file so that you can have a try.
ScopeOfScriptInGHPlayer.rhp (35.5 KB)

Hi Gaspard -

I would say that’s as expected. I would have been surprised if the compiled version behaved differently than when run with the GrasshopperPlayer.
-wim

1 Like

This issue is the counter example

Working with ghplayer but not in compiled version.

Hi Gaspard -

I can’t tell from any of the threads that are involved here if this still is an issue.
RH-65648 was closed because the specific script that was used as an example is now implemented as an option in the Get Geometry component - namely deleting the input geometry.

If you still have an issue with scripts being hidden in the background, please provide a sample gh file with a python component with your script and without any 3rd party plug-ins.
Thanks,
-wim

Hi Wim,

As I use a lot object’s id in my script, it is still an issue.

I created a gh without any 3rd party plugin and I added it to the other thread.
A direct link here :

I read the discussion attached to the issue RH-65648, good job for the update, my example is still quite different and can’t be solved from just deleting the input after solving.

Would it be possible to open a new issue to solve the caching issue directly ?
I use a lot of scripts and I can’t afford to have one updating itself in the cache, it uses resource and it produces unexpected behaviour.

I find it very convenient to work with grasshopper player and I hope that I could turn my work into a nice compiled plugin one day.

Hi Gaspard,
did anything happen on your issue yet??

I’m having similar trouble even without using a script. I’m using the Input to create something new - deleting is not an option.

Hello @wim,
any news about opening another issue to solve this ?
Thanks.