GraphiteEditor / GraphiteEditor/Graphite

Async executor refactor

オープン
#3,781 コメント 4 件 リアクション 0 件 担当者 1 名 @TrueDoctor が担当を希望しています GitHub で見る
Graphene
主要言語
Rust
スター
27.2k
フォーク
1.3k
平均マージ
20時間 5分
マージ済み PR(30日)
57

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。