Python Script use verry high amounts of RAM

Hi again,

I have a python script that distributes Geometry over a model. As an input I take roughly 4000 surfaces and as an output I get about 2000 class instances where each one has: a bounding box (rhinocommon class), a list with the indexes of some (250 average I’d guess) surfaces and one bool.

Using this component and a similar one at the same time qickly buils up 8 gb of RAM usage.
Is this normal? Where can I read up on how to keep RAM usage low(er)? Do I need to clean up after my functions?

Thanks,
Henning

If you’re scripting on 4000 surfaces, you’re most definitely going to be using a lot of processing power and RAM. You can revise your script to minimize what your committing to memory, put data in iterators instead of lists, and tighten your for loops. If you post up your script, it would be easier to see where to optimize.