GraphiteEditor / GraphiteEditor/Graphite

Async executor refactor

Offen
#3,781 4 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @TrueDoctor Auf GitHub ansehen
Graphene
Vorherrschende Sprache
Rust
Sterne
27.2k
Forks
1.3k
Ø Merge
20 Std. 5 Min.
Gemergte PRs (30 T.)
57

Beschreibung

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".

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.