Open BigRoy opened 2 years ago
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.
I agree that logging full instance or context data is overkill especially when it's in each plugin.
Heavy logging still slows down publishing a lot. We may want to reduce the print-out to host consoles, etc.
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:
1001-1300
(just so expected files list is large to log)Expected behavior
Should be instant.
Desktop (please complete the following information):
[cuID:OP-3451]