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

UFE4 find all cameras very slow #4125

Open
dj-mcg opened this issue Feb 19, 2025 · 1 comment
Open

UFE4 find all cameras very slow #4125

dj-mcg opened this issue Feb 19, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dj-mcg
Copy link
Collaborator

dj-mcg commented Feb 19, 2025

Pixar's current referenceAssembly approach to its set construction workflow results in a single Maya scene containing potentially thousands of ProxyShapes - essentially one per asset in the set. Users have noticed that selecting the Panels > Perspective menu was very slow to populate - on the order of 20 seconds or so - if there are a large number of ProxyShape nodes loaded.

I tracked the slowness down to an O(n^2) operation that UFE4's Find All Cameras logic triggers. It appears that for each node in the scene, this logic makes a call into the find_ function of each camera handler - one call into the ProxyShapeCameraHandler and another call into the UsdCameraHandler. Then, for each node, it triggers a call to findUsdGatewayItems, which calls getAllStages, which traverses the entire scene getting each proxyShape, hence the O(n^2) growth rate.

I haven't been able to track down the call to findUsdGatewayItems in the open source mayaUsd code so I assume the call is within UFE itself. I'm curious if this call or the call to getAllStages is necessary to perform for each ProxyShape node in the scene, or if it may be cached internally to avoid all this redundant work?

This was also slow in UFE3, but we're just chasing it down now. I can generate an example test scene if needed.

@dj-mcg dj-mcg added the bug Something isn't working label Feb 19, 2025
@wallworm
Copy link
Collaborator

Thanks for reporting. I think all of this was fixed in later UFE but we'll investigate for a more official response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants