GraphiteEditor / GraphiteEditor/Graphite

Async executor refactor

Ouverte
#3,781 4 commentaires 0 réactions 1 personne assignée Réclamée par @TrueDoctor Voir sur GitHub
Graphene
Langage dominant
Rust
Étoiles
27.3k
Forks
1.3k
Merge moyen
20 h 5 min
PR mergées (30 j)
57

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.