Geometry Nodes evaluation and UI thread responsiveness
0 reputation · 25 Aug 2020, 21:18 UTC
0 reputation · 25 Aug 2020, 21:18 UTC
Blender's Geometry Nodes system utilizes a dependency graph to update mesh data in real-time. When executing complex procedural setups—such as high-iteration duplication or dense point cloud generation—the evaluation process can heavily tax the system resources.
Because the main thread often waits for the modifier stack to complete its calculations, there is a risk of the user interface becoming unresponsive during the evaluation of heavy node graphs.
While the Escape key is documented as a method to cancel certain long-running operations, the effectiveness of this interruption varies depending on the specific node operations being processed in the C++ backend.
33275 reputation · 26 Aug 2020, 01:42 UTC
How does Blender interrupt a Geometry Nodes evaluation?
Blender’s dependency graph runs Geometry Nodes on the main UI thread by default. The C++ backend periodically checks an internal cancellation flag that is set when the user presses Esc or when the system decides to abort a long‑running operation. However, not all node functions honor this flag; some low‑level kernels (e.g., high‑iteration Duplicate Geometry or dense Point Distribute) run to completion before the flag is checked, so Esc may appear ineffective.
Is there a mechanism to keep the UI thread responsive?
Yes, but only with a combination of UI options and workflow changes. Blender provides a Background Evaluation toggle in the viewport performance panel that offloads Geometry Nodes to a worker thread. When enabled, the viewport can continue to respond while the node graph is evaluated in the background. If this option is unavailable or still causes freezes, the following practical steps usually help:
In the Viewport → Performance panel, turn off Auto Refresh. The viewport will only update when you manually trigger a refresh (e.g., pressing Alt‑R or changing a node). This eliminates the automatic, often expensive, re‑evaluation that happens on every viewport change.
Also in the same panel, check Background. Geometry Nodes will run on a background thread, freeing the main thread for UI interactions. Note that this feature is only available in Blender 3.5+ and may not work for every node type.
Switch the viewport shading to Wireframe or Solid with a low Viewport Samples value. Material or Rendered shading forces a full evaluation of all node outputs, which is the most expensive path.
Under Render → Simplify, reduce Viewport detail. This limits the number of points or faces that the node tree must process for the viewport, keeping the UI snappy while the final baked geometry remains unaffected.
If the node graph is static for the final output, bake it to mesh data: select the object, press Ctrl‑A → Apply → Geometry Nodes. After baking, the node group can be removed or hidden, and the viewport will no longer need to evaluate it on every change.
Use the Window → Toggle System Console and look for “Geometry Nodes evaluation” messages. If a particular node consistently takes the longest, consider simplifying it or breaking it into smaller sub‑groups.
Esc Seems IneffectivePressing Esc will cancel the evaluation only if the current node operation checks the cancellation flag. For operations that run a tight kernel loop, the flag is not checked until the loop completes. In those cases, the best mitigation is to reduce the workload (e.g., lower iteration counts) or use the background evaluation option.
Do you currently have Auto‑Refresh enabled in the viewport performance panel? Enabling or disabling this option can dramatically alter how often Geometry Nodes are evaluated and therefore how often the UI freezes.
Use comments to ask for clarification. Post a solution as an answer.
33,275 reputation · 26 Aug 2020, 05:46 UTC
Blender’s Geometry Nodes evaluation runs on the main thread unless the Background Evaluation viewport option is enabled (available from Blender 3.5). The Escape key sets a cancellation flag that is only inspected at specific 'yield points' in the dependency‑graph traversal; low‑level kernels such as dense point distribution or high‑iteration duplication often execute without yielding, so Esc may seem ineffective. To keep the UI responsive, combine background evaluation with disabling auto‑refresh and, when possible, replace heavy procedural steps with baked caches or simpler proxy geometry.