Meets the phase 1 speed gates and records the memory gate decision.
- Inline scanning over unicode scalars with a first-character filter and token text sliced from the source: full parse of a 1.5 MB file 313 ms -> 62 ms.
- Region reparse: structural edits reparse a verified window of the innermost section's body; table rows are reused. Blank line in a 1.2 MB top-level section 256 ms -> 7 ms.
- Editor: load through the text storage, style the first screen before the first render and the rest in the background, restyle only the rows or items around an edit in large tables and lists; tree queries create only the child nodes they need.
GateTests(run withORGSTAR_GATES=1): open, typing and blank-line p95, and heap memory, on a 1 MB single-section file, a 5,000-row table and an optional real file.- Memory gate in
docs/design.md: 10x for typical documents, 45x for the worst-case synthetic files.
Gates (release, this Mac): csg.org open 75 ms, typing 6.5 ms, blank line 7.3 ms, memory 9.6x; single section 76 / 7.0 / 8.1 ms, 30.4x; table 38 / 3.2 / 8.8 ms, 42.9x. Reparse comparison: 500,000 random edits over five seeds; restyle comparison: 4,500 over three seeds. All 164 tests pass. Not yet run on the M1 Air reference machine.