Compile editor buffers without waiting for a save

Project preview accepts ?buffer=1 and reads the editor text from the POST body.
The source is still expanded with project includes/packages/images, but the file
on disk is not touched, so typing can drive layout immediately while the normal
450 ms save timer runs independently.

Add a server test that previews buffer text, finds it in the SVG, and verifies
hello.tex on disk was not rewritten. Roadmap notes that warm buffer previews
are still ~430 ms (article) and ~2.1 s (arXiv), and that dirty-page streaming
is the next latency step.
This commit is contained in:
gloamxun committed 2026-10-27 21:01:24 +08:00
1 parent 30f1df03ca
commit e2e80e8728
7 files changed
+61 -10

No files matched your search

+7 -2
View File
@@ -49,11 +49,16 @@ execution is not a goal.
- project-scoped sessions and changed-page reporting;
- web `applyPages` skips pages whose hash is unchanged;
- a 90 ms preview debounce and 450 ms save debounce.
- Incremental progress in the working tree:
- project previews accept `?buffer=1` with the editor text as the request
body, so preview no longer waits for the 450 ms disk save;
- the web editor previews on a 40 ms debounce while saving on the old timer;
- `changedPages` already identifies the pages that need repainting.
- Incremental bottlenecks:
- the server still returns every page's SVG JSON;
- the browser downloads all pages before hash-skipping;
- project edits wait for the save timer before preview;
- the arxiv project's preview/layout is still in the 1.4–1.5 s range;
- measured warm buffer previews are still about 430 ms for article-basic
and 2.1 s for the arXiv template; the <100 ms target is not met;
- no WebSocket/SSE stream or dirty-page patch protocol.
## Architecture