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

Use Gaffer 0.54 Cache Policies #36

Closed
johnhaddon opened this issue Jul 23, 2019 · 0 comments · Fixed by #38
Closed

Use Gaffer 0.54 Cache Policies #36

johnhaddon opened this issue Jul 23, 2019 · 0 comments · Fixed by #38
Assignees
Labels
enhancement New feature or request

Comments

@johnhaddon
Copy link
Collaborator

Until now, if more than one thread in Gaffer wanted the result of the same computation, and that result wasn't in the cache yet, both threads would perform the compute. This can be particularly bad for big computes that do IO, which I believe is a good description of the AtomsCrowdReader.__engine plug.

Gaffer 0.54 provides the option of blocking in this case, so that the computation is only performed on a single thread. Relevant documentation here :

https://github.com/GafferHQ/gaffer/blob/master/include/Gaffer/ComputeNode.h#L81-L86
https://github.com/GafferHQ/gaffer/blob/master/include/Gaffer/ValuePlug.h#L105-L129

And an example is here :

https://github.com/GafferHQ/gaffer/blob/master/src/GafferImage/OpenImageIOReader.cpp#L756-L771

Feel free to give me a shout if you have any questions.

@johnhaddon johnhaddon added the enhancement New feature or request label Jul 23, 2019
@andrewkaufman andrewkaufman self-assigned this Aug 9, 2019
andrewkaufman added a commit to andrewkaufman/atomsGaffer that referenced this issue Aug 23, 2019
…nal Engine.

The EnginePlug is expensive to compute, so we want to make sure we don't compute it from multiple threads at once.

This change reduced max resident size on a production example from 15.97Gb to 6.78Gb

Fixes Toolchefs#36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants