-
Notifications
You must be signed in to change notification settings - Fork 37
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
Proposal: Automatic caching of condition functions #125
Comments
@csadorf what was your idea here? Is the idea that if a given condition function decorates multiple operations, then we could reuse cached results? We still definitely need to start from scratch again every time that |
Yes, the same condition function is evaluated potentially many times during one status update. That could be automatically cashed. I think that we assume "no changes" to the data space during |
In addition, often labels are used as condition functions. This would prevent the calculating of labels more than once as well. |
I think that various internal variables are named somewhat ambiguously because in earlier versions of signac there was less conceptual separation between labels and conditions (basically before the decorator syntax). If we were to handle this with respect to both labels and conditions, it would probably be helpful to clearly separate these two objects in the code. |
We could definitely do that, but to see the most performance gains we would need to identify both conditions and labels by some means that would tell us when the underlying function is the same. |
Feature description
We are currently operating under the assumption that the project data space does not change while we are gathering the project status.
We should take advantage of that assumption and automatically cache all condition functions.
Proposed solution
Caching should be done on a per-instance level, but should be parallelizable.
The text was updated successfully, but these errors were encountered: