Repository navigation
Implement async refactor #4731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+4,066
−2,463
Merged
Implement async refactor #4731
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
a69a859
Add editor task module, drop NodeGraphUpdateSender
timon-schelling 0695cf1
Remove Node::reset and unused value nodes
timon-schelling 2ecccf2
Remove unneeded async from vector nodes
timon-schelling 81f0798
Remove unneeded async from graphic nodes
timon-schelling fe482b8
Remove unneeded async from raster nodes
timon-schelling 0d43744
Remove unneeded async from the remaining nodes
timon-schelling 206aee1
Make most node fns private
timon-schelling 26be1d3
Make node construction sync
timon-schelling c7eb37a
Remove block_on around node construction
timon-schelling b725e05
Move GPU readback into ConvertAsync
timon-schelling 12c1638
Make Convert sync
timon-schelling 3f841fe
Make wgpu pipelines and vello rendering sync
timon-schelling f09b77c
Make convert, brush and render nodes sync
timon-schelling dea878a
Pass editor API as owned Arc
timon-schelling 28f2246
Take scope inputs by value
timon-schelling bc6e52b
Move Spawn and Task into core-types
timon-schelling bf51294
Add Poll type and status tracking
timon-schelling 45f0de4
Add source generations to context
timon-schelling a5703b4
Stop storing context features in the document
timon-schelling c2de87e
Track source ids in context modification
timon-schelling 6e5b814
Add async runtime and memo table
timon-schelling bfe51f5
Pass runtime through scope, expose source ids
timon-schelling 436b41c
Set up async runtime in editor, CLI and benches
timon-schelling 208d541
Give async nodes runtime and source id inputs
timon-schelling 6078782
Classify node return types in the macro
timon-schelling 7a9fb61
Make Node eval sync and return Poll
timon-schelling a1b33d5
Make lazy input nodes, tests and benches sync
timon-schelling 0cf17f8
Rerender when a spawned task finishes
timon-schelling 325061e
Rerender in CLI until all tasks are done
timon-schelling 3bc1a28
Abort pending tasks when node is dropped
timon-schelling 35b7ead
Trace errors through Poll node inputs
timon-schelling ef3c84c
Let node errors carry upstream errors
timon-schelling 52da8c7
Resolve error traces to the origin node
timon-schelling eef450a
Show evaluation errors in the node graph
timon-schelling 0bae066
Default unmapped item primaries to a value
timon-schelling cd389d5
Add debug nodes
timon-schelling bb7461c
Memoize fallback results too
timon-schelling 913ac42
Show multiple node graph errors
timon-schelling 918ea18
Report node errors in CLI
timon-schelling b728304
Attach input fallback error as upstream
timon-schelling ea2b9e5
Keep input fallback error when node fails
timon-schelling f818fbd
Keep Poll status in render cache
timon-schelling 826018d
Keep last frame while graph is pending
timon-schelling 396bfcc
Treat partial export output as pending
timon-schelling 42926b8
Move environment from global to dispatcher
timon-schelling fcf6747
Add editor builder, drop global node runtime
timon-schelling 20034b6
Add Wake message, rerun graph when tasks finish
timon-schelling 87e769c
Add source generation tests
timon-schelling cf9b898
Add test for node error origin
timon-schelling 4771b5e
Add render status overlay
timon-schelling 11cff62
Replace error artwork with render status
timon-schelling e1ee8a4
Poll node graph through portfolio message
timon-schelling f21e350
Minor review fixups
TrueDoctor b03061a
Remove future type and macro
TrueDoctor 13299fc
Merge master into async-refactor
timon-schelling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| use crate::wrapper::{Spawn, Task}; | ||
|
|
||
| pub(crate) struct TokioSpawner(tokio::runtime::Handle); | ||
| impl TokioSpawner { | ||
| pub(crate) fn new(handle: tokio::runtime::Handle) -> Self { | ||
| Self(handle) | ||
| } | ||
| } | ||
| impl Spawn for TokioSpawner { | ||
| fn spawn(&self, task: Task) { | ||
| self.0.spawn(task); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The runtime thread wakes the editor unconditionally on every 10 ms polling iteration, causing idle sessions to dispatch editor graph polling roughly 100 times per second. Only wake the editor when requests or runtime results actually require processing, and block on a notification instead of polling continuously.
Prompt for AI agents