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

Maya: Collect Render slows down publishing a lot #817

Open
BigRoy opened this issue Jun 23, 2022 · 3 comments
Open

Maya: Collect Render slows down publishing a lot #817

BigRoy opened this issue Jun 23, 2022 · 3 comments

Comments

@BigRoy
Copy link
Collaborator

BigRoy commented Jun 23, 2022

Describe the bug

Collect Render is really slow for large scenes with many layers. The only reason why it's slow is due to these logging lines:

That changes a scene that takes 15+ seconds to collect back down to <1 second to collect when they are removed.

The issue also is that with that much logged data somehow the Pyblish Pype UI gets relatively slow. The UI remains repsonsive just fine when not processing (except when looking into the logs of that plug-in) but it gets really really sluggish during processing when needing to log more. For example, with the logs still enabled validation also becomes very slow for my test scene - but with those logs just removed in collect_render then validation also becomes close to instant.

It's a huge speed difference.

I've quickly tested moving these into an if branch so it only runs if os.environ.get("OPENPYPE_DEBUG") == "1" and that also worked.

To Reproduce
Steps to reproduce the behavior:

  1. Create 10 Render Setup layers (so there's quite a few layers to process)
  2. Set render frame range to have 200+ frames, e.g. 1001-1300 (just so expected files list is large to log)
  3. Try to publish/submit scene. It'll be very slow.

Expected behavior

Should be instant.

Desktop (please complete the following information):

  • OS: Windows
  • Host: Maya 2022

[cuID:OP-3451]

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jun 23, 2022

Note

I should add that I had done a similar optimization for the verbose logging in CollectAnatomyContextData, CollectAnatomyInstanceData and CollectInstances to not log the full json dumped data unless OPENPYPE_DEBUG == 1. That's also why collecting on my end might have been under a second after this change - if you try and reproduce the speed up you migth still see slow-downs due to those collectors also being very slow.

@iLLiCiTiT
Copy link
Member

I agree that logging full instance or context data is overkill especially when it's in each plugin.

@m-u-r-p-h-y m-u-r-p-h-y added host: Maya type: enhancement Improvement of existing functionality or minor addition labels Aug 31, 2022
@BigRoy BigRoy transferred this issue from ynput/OpenPype Jul 29, 2024
@BigRoy
Copy link
Collaborator Author

BigRoy commented Jul 29, 2024

Heavy logging still slows down publishing a lot. We may want to reduce the print-out to host consoles, etc.

@mkolar mkolar removed the type: enhancement Improvement of existing functionality or minor addition label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants