-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Currently, the node graph returns a "shadow structure" of itself as its final return type from the compiled form of the graph. This is a description of the topology to be executed in an async manner. Then, in our async runtime (on web, that's the JS async runtime which creates new call stacks on each invocation), we "poll" by repeatedly calling for the next async invocation, until all async nodes have been processed, yielding the final result.
The async refactor is a core architectural change that involves building our own async runtime that operates on the graph structure itself, eliminating the "shadow structure" returned by the graph. Instead of the graph being a machine that returns its own topology of async instructions for invocation by another runtime, the node graph itself becomes the runtime. This involves replacing the async executor/runtime with our own custom-built on that operates on the graph.
This is expected to improve performance and make async nodes more flexible, such as supporting long-running nodes that return intermediate preview results (see #1608). It also resembles the planned approach to #2988 where, in that case, the iterator uses the graph itself rather than returning an iterator type that recursively describes the graph "shadow structure".
Sub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status