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

PathListingWidget : Avoid blocking UI in setPath( rootPath ) #5948

Merged

Conversation

johnhaddon
Copy link
Member

The root path is the only path that we ever display in fundamental UIs like the HierarchyView and RenderPassEditor. In this case we were needlessly invoking Path.isLeaf() and Path.isValid() on the UI thread, causing ScenePath and RenderPassPath to trigger arbitrary computation that could block the UI until complete. By taking an early-out for the root path can completely avoid that, with all the remaining work all happening in a BackgroundTask.

@johnhaddon johnhaddon self-assigned this Jul 9, 2024
The root path is the only path that we ever display in fundamental UIs like the HierarchyView and RenderPassEditor. In this case we were needlessly invoking `Path.isLeaf()` and `Path.isValid()` on the UI thread, causing ScenePath and RenderPassPath to trigger arbitrary computation that could block the UI until complete. By taking an early-out for the root path can completely avoid that, with all the remaining work all happening in a BackgroundTask.
@johnhaddon johnhaddon force-pushed the pathListingWidgetImprovement branch from 6207f97 to f8add5e Compare July 9, 2024 12:02
Copy link
Contributor

@murraystevenson murraystevenson left a comment

Choose a reason for hiding this comment

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

LGTM. Even more reason now to figure out where to place that BusyWidget...

@johnhaddon johnhaddon merged commit 36f02ca into GafferHQ:1.4_maintenance Jul 9, 2024
5 checks passed
@johnhaddon johnhaddon deleted the pathListingWidgetImprovement branch August 7, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants