Skip to content

v2.1.6-alpha — zero-allocation live reproject

Pre-release
Pre-release

Choose a tag to compare

@bpacholek bpacholek released this 13 Jun 12:43
· 59 commits to main since this release

The first half of #84 (the #80 follow-up): the live edit reproject now reuses a single segment-build scratch across all physical lines, instead of allocating one temporary per line.

Performance

  • Combined with #80's arena pooling, a steady-state keystroke reproject of a large (>2 MiB) buffer now allocates 0 B / 0 allocations on both minified and pretty-printed shapes — the pretty shape previously allocated ~2.16 MB / ~67 000 times (one []Seg per line). The non-pooled ParseEditableColored benefits too (~67 000 → ~18 allocations). Output is byte-identical, locked by the TestEditPoolEqualsFresh equality fuzz and a new TestEditPoolPrettyAllocsConstant teeth guard.

The remaining half of #84 — making per-keystroke wall time strictly proportional to the edited region (the in-place line-range splice that revisits the immutable-Document decision) — is still open and P3.

The /v2 surface is unchanged; stays -alpha.

Full Changelog: v2.1.5-alpha...v2.1.6-alpha