Skip to content

v7.16.2

Latest

Choose a tag to compare

@metonym metonym released this 30 Jul 15:35
· 11 commits to master since this release
v7.16.2
ebf498e

Performance

  • checkpoint incremental tokenization every 32 lines instead of every line (2f2999c, #481)
  • append sealed HighlightStream chunks without an O(c) spread copy (436ced0, #482)
  • avoid rebuilding completed HighlightStream HTML every frame (b55216b, #483)
  • O(delta) DOM paint for pure appends in HighlightEditable (ee4c972, #484)

Performance

Perf-only patch. No API changes. Thanks @ljodea!

Incremental tokenize checkpoints (#481)

Checkpoints every 32 lines instead of every line.

Memory: ~32x less retained checkpoint memory (~5MB at 32k lines).

HighlightStream sealed-chunk append (#482)

Append sealed chunks with push instead of [...sealedChunks, html].

Time: O(c²) → O(c) per seal.

HighlightStream highlighted rebuild (#483)

Append completed-line HTML once; stop rebuilding the completed prefix each frame.

Time: still O(n²), ~2–5x less work per frame.

HighlightEditable pure-append paint (#484)

On end-of-document appends, paint only the new suffix.

Time: O(n²) → O(n). ~3–10x at 2k–8k chars. Mid-document edits unchanged.