Repository navigation
feat(effects): check an effect's code off the main thread, and price the tiers on an M1 - #1220
Merged
EtienneLescot merged 1 commit intoOct 14, 2026
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks done
EtienneLescot
force-pushed
the
feat/shader-effects-macos
branch
from
October 14, 2026 16:23
80c6dde to
e16a014
Compare
EtienneLescot
changed the base branch from
feat/shader-effects-macos
to
integration/shader-effects
October 14, 2026 17:46
…the tiers on an M1 A Metal compile takes 120 ms for a new source on an M1, up to 375 ms for the first in a process (#1206), against 10 ms for FXC. checkShaderEffect ran it on the main process's thread. - The addon's checkShaderEffect is an AsyncTask on the libuv pool, like segmentFrame. The service and the checker type return a promise; the service awaits it inside its try, so a rejecting addon still reads as "not checked", as a throwing one did. - runDocumentTool asks first, for the code addEffect or setEffectDefinition will store (shaderEffectToCheck), then hands the answer to the executor, which stays synchronous, as the cursor read and the auto-zoom plan already do. Edits off: nothing is asked. - addEffect's description and the MCP contract resource give each tier in ms on the RTX 4070 Ti and on the M1, as the spec's C.7 asks.
EtienneLescot
marked this pull request as ready for review
October 14, 2026 17:51
EtienneLescot
force-pushed
the
feat/shader-effects-async-check
branch
from
October 14, 2026 17:51
5a564fc to
401157e
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
A Metal compile of a new effect takes 120 ms on an M1, up to 375 ms for the first in a process (#1206), against 10 ms for FXC.
checkShaderEffectran it synchronously, on the main process's thread, at everyaddEffectandsetEffectDefinitionthat writes code.Targets
integration/shader-effects, rebased on it after #1206 merged (whose spec section H.3 this updates). The review's "a throwing addon reads as not checked" carries over: the service now awaits the promise inside itstry, so a rejection lands there too.checkShaderEffectis anAsyncTaskon the libuv pool, likesegmentFrame.CompositorViewService.checkShaderEffectand theShaderEffectCheckertype return a promise.runDocumentToolasks first, for the code and parameter layout the call will store (shaderEffectToCheck), then hands the answer to the executor (shaderEffectCheckLookup), which stays synchronous. The cursor read and the auto-zoom plan already work that way. With edits off, nothing is asked.addEffect's description and the MCP contract resource give each tier's cost per 1080p frame on the RTX 4070 Ti and on the M1, as the spec's C.7 asks.rendering-performance.md.Related issue
Part of the shader effects work (#1199, #1202, #1206).
Type of change
Release impact
Desktop impact
Testing
npx tsc --noEmitandnpx tsc -p tsconfig.test.json --noEmitpass.npx vitest --run electron/ai-edition electron/mcp electron/native-bridge src/lib/ai-edition src/native workbench: 2224 tests pass. The new ones cover:runDocumentToolwaiting for a slow checker before accepting or refusing;setEffectDefinitionchecking new code against the definition's parameters;await).npm run lint: no errors.cargo build -p compositor-view-napibuilds on macOS.npm run test, and the in-app agent in the GUI.