-
Notifications
You must be signed in to change notification settings - Fork 36
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
Houdini: Optimize collect inputs by caching scene containers once #305
Houdini: Optimize collect inputs by caching scene containers once #305
Conversation
# down. As such, we cache it so we trigger it only once. | ||
# todo: Instead of hidden cache make "CollectContainers" plug-in | ||
cache_key = "__cache_containers" | ||
scene_containers = instance.context.data.get(cache_key, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a small question, is the cache_key
always named as __cache_containers
? It seems quite hard-coded to me but if it is always named like this, it is still okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. In the past I had sometimes prefixed it also with the class name to ensure better uniqueness. But yes, in a way it is hardcoded. Feel too unsafe? Should I prefix it more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moonyuet let me know what you'd like me to do here to make this ready for merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moonyuet let me know what you'd like me to do here to make this ready for merging
we can merge this first as I guess there would be enhancement when building the universal node for publishing.
client/ayon_core/hosts/houdini/plugins/publish/collect_inputs.py
Outdated
Show resolved
Hide resolved
Tested with houdini, looks good and please review comment above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it works.
I tried many cases :
- point directly to the sop node in loaded products.
- point to the obj node that's parent of the loaded sop nodes.
- point to an object merge node that combines different loaded nodes.
I'm not quite familiar with this plugin.
So, we trace of any loaded nodes that contribute to the output data and save their ids in "inputRepresentations"
?
if my description is correct, then I'm wondering how could we benefit from that piece of information ?
Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
That's correct - it detects what input loaded content was used in your output so they could turn into "Links" in your publish. I believe there's a The data gets converted here: ayon-core/client/ayon_core/plugins/publish/collect_input_representations_to_versions.py Line 5 in 70306a1
Then those turn into "generative links":
It's so that from a particular publish you can see which input versions were used. So that with e.g. the (upcoming) links UI in the web frontend you could trace the inputs upstream and outputs downstream of each publish. In OpenPype the loader also had a "Dependencies" tab bottom right hand side. This hasn't been ported to AYON loader (yet?) but could basically display the same info. |
Changelog Description
Optimize collect inputs by caching scene containers once
Additional info
Behavior should be the same - it just doesn't list all scene containers and involved nodes per instance, but does it only once in the publish session, making it much faster when running over many instances.
Testing notes: