Original report by Anonymous.
See https://bitbucket.org/pycpa/pycpa-git/src/9127bab/pycpa/analysis.py#lines-685
At least on my system, this can be really slow (removing this line reduced analysis time from 12 seconds to 100 milliseconds for my model under analysis).
Johannes already told me that this is necessary for very large task graphs, because Python apparently does not run the garbage collector when it runs out of memory.
To address both use cases, it might make sense to add an optional argument (or check gc.isenabled()) to allow users to opt in or out of the garbage collection. It might also be worthwhile to check if collecting the younger generations suffices.