perf(svelte): reuse incremental parsing in streams - #396
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
◈ PR Lens
Architecture 6 components touched across 2 lanes. Inside the changed components — 2 viewsComponent view — Svelte Adapter Internal modules in @comark/svelte managing reactive component rendering and serialized streaming parse execution. Component view — Core Parser & Streaming Core engine modules handling token processing, frontmatter resetting, and streaming AST node reuse guards. Data flow
Drill down
|
Documentation previewsPreviews are disabled for pull requests from forks. |
|
@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
What
Keep a serialized parser in Svelte streaming components so each update reuses completed blocks. Reset it when parser settings change and parse the full source when streaming ends. Use a full parse for heading tails and reference definitions to preserve IDs and links.
Why
Svelte currently parses the entire source on each update, as discussed in #135. Also clear stale frontmatter when a stream switches documents. Fix the Syntax playground's
valueprop so it renders the example.Related #397.
Parser timings for the shared React/Svelte call pattern, using the published PR code: