Grasshopper Save Solution?

Hi, I’ve been working on my file for 6-8 months now and my code is getting bloated.

I’m on a final stretch, my algorithm is 99% production ready. Opening the file now takes 5 minutes just to let it solve everything and I often open a close my file a few times a day(accidently crashing it myself).

Is there a way to open the file with the data internalized already to every component? Opening the file and not having to re-compute several times a day will be a huge time saver in the long run for me.

I’m aware the file size will balloon like mad, but seeing how I still barely use 10-20% of my 2tb of storage, I’m willing to make the sacrifice to my storage. I’m not sure if this has anything to do with anything, but grasshopper hovers around 700Mb of Ram.

Any suggestions would help a lot, any optimizations before production would help immensely

Break your code into pieces and use Data Output andData Input to pass geometry (curves, breps, points, etc.) and numeric values from one to the other. The data is saved in a special file and will still be there tomorrow so you only have to open the last file in the chain - unless you want to make changes earlier in the process, of course.

2 Likes

BIG Thanks, actually saved me hours of time.

Just be careful about changing the wiring. You can safely add inputs to the end of the list on Data Output but if you want to remove inputs or change what you have, the best way is to modify the destination filename (I use version numbers) on Data Output before making changes. Then make all the changes you want before going to the receiving file, where you add a new Data Input component using the new ‘Source’ (Destination) filename. Then carefully transfer wires one by one from the old Data Input to the new one.

Failure to do this can lead to chaos because the wiring gets all messed up. Poor implementation that uses only the sequence of wires and ignores output names. :man_facepalming: Otherwise, it’s great.

1 Like