Skip to content

v0.13.3

Choose a tag to compare

@odvcencio odvcencio released this 04 Apr 22:12

Highlights

GLR large-file performance (PR #22 by @vdergachev)

Parsing a 147KB protobuf-generated Go file drops from 4+ minutes to ~420ms (~116x speedup). Removes redundant node zeroing, optimizes the GLR equivalence cache, and sets maxGLRStacks=2 for Go.

Allocation elimination (PR #21 by @rsnodgrass)

  • O(1) DetectLanguage with thread-safe sync.RWMutex registry
  • Zero-alloc Walk via sync.Pool-backed stack
  • Highlight buffer reuse: -85% B/op, -13% wall time
  • LoadLanguage pre-sizing: -27% time, -15% memory

Incremental parsing fix (issue #23)

HighlightIncremental returned incorrect results after sequential single-character deletions. The reuse cursor offered leaf nodes with stale parser-state metadata from shifted positions. Fixed by requiring byte-content equality for all candidates under dirty ancestors.

Full changelog

See CHANGELOG.md