Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Publish pype: Reduce publish process defering #2464

Merged
merged 5 commits into from
Jan 4, 2022

Conversation

iLLiCiTiT
Copy link
Member

Brief description

Defered execution in publish pype makes processing much slower because of deffering.

Description

Reduced defering of execution to minimum using main thread process helper. Which tries to execute methods each 10 ms (if there are any). This approach makes publishing faster and should also allow repaint of UI.

Changes

  • copied main thread processor from new publisher (and slightly modified) to publish pype
  • converted current methods to use new processor to reduce waiting time

Notes

  • didn't test actions
  • didn't test long time plugins properly but collect ftrack api (takes 1s +/-) stopped and UI was painted

Testing notes:

  1. Run publish
  2. Check speed
    *3. Try to run any action (repair etc.)

@iLLiCiTiT iLLiCiTiT self-assigned this Dec 31, 2021
@iLLiCiTiT iLLiCiTiT added the type: enhancement Enhancements to existing functionality label Dec 31, 2021
@BigRoy
Copy link
Collaborator

BigRoy commented Dec 31, 2021

It's definitely much faster than it was originally. Great work!

However it still feels slower than the previous one (before this PR) with PYBLISH_DELAY environment variable set to e.g. 0.01 - as if there's still a minor bigger delay between the processing of each plug-in. The delay is mostly noticable when it's running over many plug-ins, e.g. during Collecting. It's a bit of a guesstimate but I'd say per plug-in this is still about 50% of the original at PYBLISH_DELAY=0.02 setting. With the original and that setting on a light scene it's literally so fast I almost don't see it process, but with this PR version I still see it go one by one taking its time briefly.

To back this up I might need to just make some screen recordings next week to actually time these as opposed to going based on how they feel on first sight.

Nonetheless, this is a very welcome speed improvement. It might even be that though it's (correction: at first sight it feels - it's subjective!) slightly slower that the UI actually is more responsive with this implementation.

@iLLiCiTiT
Copy link
Member Author

Lowered the timeout to 3ms.

The main issue with PYBLISH_DELAY is/was that it may be unpredictible and nonsequential.

This is catching of milliseconds right now :) I wonder if the paint event will be triggered in those 3ms on slower PC...

Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested in Maya and Houdini and it works ... so .. fast 🏎️

@iLLiCiTiT iLLiCiTiT merged commit 5ca4437 into develop Jan 4, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/reduce_publish_process_defer branch January 5, 2022 15:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants