Summary
The Gaffer image viewer evaluates images in background so that expensive image computation does not block the UI. However, the image format (resolution) is evaluated directly on the UI thread rather than via a background task. For standard Gaffer image nodes this is fine because resolution evaluates quickly, but in niche cases where the image and its resolution are computed together as a single expensive operation—and cannot be separated—this blocks the UI. This proposal requests that the viewer query all image parameters, including format, in a non-blocking fashion.
User story
What
As a user, when I view an image whose format is expensive to compute, the Gaffer UI should remain responsive rather than blocking while the resolution is evaluated.
Why
There are cases where an image and its resolution are produced by a single expensive operation that cannot be split into separate computations—for example, a node that executes an external template or runs a render as a subprocess. In these situations the image data is already evaluated lazily without blocking, but evaluating the format directly on the UI thread freezes the viewer until the entire expensive operation completes.
Feature proposal
Update the image viewer so that format/resolution—and ideally all image sub-plugs it queries up front—are evaluated through the same background-task mechanism already used for image data, rather than synchronously on the UI thread. While the format is being computed, Gaffer should remain interactive.
Example scenario(s)
- Create a scenereader node whose path is computed with a python expression. Add time.sleep(10) to the expression
- Connect it to the image viewer.
- Observe current behaviour: the UI blocks while the format is evaluated, even though image data evaluation is done in the background.
- Desired behaviour: the viewer stays responsive, shows a pending state for the format, and updates once the background evaluation of all image parameters completes.
Summary
The Gaffer image viewer evaluates images in background so that expensive image computation does not block the UI. However, the image format (resolution) is evaluated directly on the UI thread rather than via a background task. For standard Gaffer image nodes this is fine because resolution evaluates quickly, but in niche cases where the image and its resolution are computed together as a single expensive operation—and cannot be separated—this blocks the UI. This proposal requests that the viewer query all image parameters, including format, in a non-blocking fashion.
User story
What
As a user, when I view an image whose format is expensive to compute, the Gaffer UI should remain responsive rather than blocking while the resolution is evaluated.
Why
There are cases where an image and its resolution are produced by a single expensive operation that cannot be split into separate computations—for example, a node that executes an external template or runs a render as a subprocess. In these situations the image data is already evaluated lazily without blocking, but evaluating the format directly on the UI thread freezes the viewer until the entire expensive operation completes.
Feature proposal
Update the image viewer so that format/resolution—and ideally all image sub-plugs it queries up front—are evaluated through the same background-task mechanism already used for image data, rather than synchronously on the UI thread. While the format is being computed, Gaffer should remain interactive.
Example scenario(s)