Skip to content

v0.5.1 — Typing on long docs is fast again

Choose a tag to compare

@Ceesaxp Ceesaxp released this 09 Jun 16:47
· 105 commits to master since this release

The headline win is keystroke latency on multi-hundred-line docs.

Fixed

  • Typing latency: Walker.utf16Offset in the syntax highlighter was O(N) per cmark node — pinned by Instruments at 54% of a 672 ms typing-hang window on a 1000-line doc. Replaced with a cached LineTable so per-node lookups are O(line_length). Typing on long docs is now smooth.
  • TextKit 1 migration: NSTextView is now forced onto TK1. TK2's lazy viewport layout was forcing fragment re-measurement inside the paint cycle even after sub-ms storage edits, contributing to the perceived lag. TK1's eager layout matches Writ's doc-size targets and removes a class of TK2-specific quirks.

Polish

  • math: false in front matter now also suppresses the $ auto-pair while you're in the source view (closes #27).
  • Custom CSS hot-reloads when the file changes on disk — no need to re-pick it.
  • Preview pipeline: JSON encoding moved off main thread; parser priority lowered so it can't preempt keystrokes; debounce bumped to 500 ms so parses don't fire after every character at normal typing speed.
  • Front-matter info cached in the text view, invalidated on storage edits.

Download: Writ-0.5.1.dmg (7.0 MB, notarized + stapled)