- Notifications
You must be signed in to change notification settings - Fork471
[WIP] Embed lang 2.0#7959
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
zth wants to merge25 commits intomasterChoose a base branch fromembed-lang-2
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+5,452 −85
Draft
[WIP] Embed lang 2.0#7959
Changes from1 commit
Commits
Show all changes
25 commits Select commitHold shift + click to select a range
3cf1e87 initial plan
zth41c511e phase 1
zth5b9a9f0 more work
zth835f7a7 more work
zthb75cd4c more work
zth8c0b6ee more work
zth8ee127d formatting + fix warnings
zth8973e35 fix warnings
zth8abc29a fix lints
zth1afbcc2 more fixes
ztha7cc8fb more fixes
zth2d82ad1 ci
zth40f26a8 more work
zth46415e6 dedicated embed syntax
zthd5daba7 work
zth5c7e4f9 work
zth337705c fix lint
zth96a87bd generator modes plan
zth54b487d ci
zthbae349e add perf optimizations section
zthe0f5de3 refactor
zth83a8c4c refactor
zth33a49c1 format
zth00284dd skip embed lang tests on windows for now
zthdabd223 work
zthFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
PrevPrevious commit
work
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitdabd22381b389c95c9e6fd6e4029d95ad3b98c1c
There are no files selected for viewing
24 changes: 24 additions & 0 deletionsdocs/EmbedLang-Perf-TODO.md
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,24 @@ | ||
| # EmbedLang Performance TODO | ||
| This document tracks incremental improvements to EmbedLang performance in Rewatch. Each step should land with tests passing and without changing user-facing semantics. | ||
| Suggested order of changes (from EmbedLang design): | ||
| 1) Single index read + tag→generator map | ||
| - Read `*.embeds.json` once per module and reuse the parsed structure for both planning and processing. | ||
| - Build a per-package `tag -> generator` map once and reuse for O(1) lookups. | ||
| 2) Global scheduling + batch parse | ||
| - Replace per‑module pools/loops with a single global work queue across all modules. | ||
| - Accumulate generated files and parse them via the standard parallel AST generation (avoid per‑file `generate_ast`). | ||
| 3) Batch‑first (one‑shot) protocol | ||
| - Group requests per `generator.id` and send in batches to reduce process overhead while keeping one‑shot execution. | ||
| 4) Daemon mode scaffolding | ||
| - Add optional persistent per‑generator processes with a simple stdio protocol and deterministic queues. | ||
| 5) Watch maps + cleanup reductions | ||
| - Maintain in‑memory maps for `extraSource -> tags -> modules` to avoid disk scans. | ||
| - Reduce O(outDir) scans in cleanup by grouping or per‑module manifests. | ||
164 changes: 111 additions & 53 deletionsrewatch/src/build.rs
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.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.