Memory Issues

I’m not sure if this is related to the issues reported earlier, but every time I run a moderately large def (by my standards), the memory increases and does not subside after it’s completed. Eventually, my usage reaches about 95%, at which point, I have to restart Rhino… Any suggestions? Thanks.

Keep in mind that most GH components will duplicate the data you feed them. Then new data may be created an is normally stored for further usage.

Depending on your definition, the amount of stored data can grow to quite a substantial amount. Memory usage will increase and be held onto unless you unload the component, Grasshopper or Rhino.


  1. keep your data (types) light until you have to. Like points instead of planes, curves instead planar surfaces,
  2. avoid unnecessary duplication (mostly of components)
  3. keep your definition lean
  4. don’t try to do everything in one run, iteration over elements may help
  5. if you can, store intermediate results and split the definition into separate parts

If memory is not released between one solution and the next, then it may be a memory leak, but during a single solution memory will accumulate. There’s no way in GH1 to mark components as ‘transient’ so all data is kept until the next solution comes around. You can switch off the preview for components to avoid calculating and storing display meshes, you can break up your file into smaller portions and send data from one to the other using Data Output and Data Input components, or you can try and reduce the amount of operations as @HaLo suggested.

How much is 95% btw.? How many objects are you dealing with? How many consecutive operations?

Of course, after claiming the sky is falling, I can’t replicate the situation, at least to the dire point of before. Since I initially posted, I’ve gotten in and out of Rhino any number of times but haven’t changed that particular program. When I run it now, under differing conditions, memory usage never exceeds 40%, which in my case is about 2G (not a lot, I know). This is also keeping just one preview open all the time.

Thank you both for the advice, and I will try them out before I knock again.