Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue: pycpa forces a full garbage collection after every propagation step #15

Open
IDA-TUBS opened this issue Aug 15, 2019 · 1 comment
Labels
analysis bug Something isn't working major

Comments

@IDA-TUBS
Copy link
Owner

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.

@IDA-TUBS
Copy link
Owner Author

Original comment by Tobias Blass (Bitbucket: [Tobias Blass](https://bitbucket.org/Tobias Blass), ).


I wrote a short patch that adds the keyword argument I mentioned. I'm not sure if this is a good long-term solution, but it solves the issue for now.

@IDA-TUBS IDA-TUBS added major analysis bug Something isn't working labels Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant