I’m trying to make my grasshopper script more manageable and reduce the computation time so it will work better with ShapeDiver. At the moment the components costing most time are the SD Input components (I have three in my script). What can I do to make these faster? I noticed reducing the file size of the file I’m trying to input helps. What other factors influence the computation time of these components? It also seems fluctuate a bit every time I recompute my grasshopper script…
The file input components trigger a download of the file in Grasshopper. Therefore the computation time of the definition depends on the time it takes the servers to download the inputs. I have looked at your model and it imports a heavy mesh as well as a big texture, which explains why the model times out frequently. That also explains the fluctuation.
There are three solutions to this issue:
As you mentioned, you could try to reduce the input files even more. I think you can safely reduce the texture without losing much, not sure about your mesh.
Upgrade your account and get longer computation times (from 5 seconds to 10 in the Pro and custom in Enterprise).
Use external geometry: if you are not doing any processing on the imported geometry in Grasshopper, then you could use our external geometry tools to prevent the download of the model on our servers and significantly improve loading times. You can even define simple transformations (rotations, translations and scaling) to external geometry if needed. Read more about this method here. These tools are also only available for Pro and Enterprise customers.
We can give you a free trial of the Pro features if you think solutions 2 and/or 3 would work for you.