I’ve compiled a set of components for acoustics analysis via ghpythonlib. So far so good. The components worked as expected until I attempted running an optimisation process. I’ve noticed that the RAM got devoured by Grasshopper after the very first iterations.
After debugging I’ve discovered that a call of ghpythonlib.treehelpers.list_to_tree() was the culprit.
For some reason, it seems that .list_to_tree() creates multiple instances of the same data tree object rather than overriding the last one. Weirdly, this happens only with the compiled version of the script. That is, if list_to_tree() is called within a GhPython component that has not been previously compiled, there is no RAM issue.