Skip to content

Markion v0.5.1

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Oct 11:02
· 6 commits to main since this release
dfd1708

Markion v0.5.1

Performance-focused release with incremental document statistics updates, Windows test improvements, and a Visual Edit CJK linked-prose wrapping fix.

Highlights

Incremental document statistics (PR #23 by @snchngny)

  • Character, word, and line counts now update incrementally on every edit instead of rescanning the entire document. When a cached statistic is valid, the replacement range plus one character before and after is used to compute the diff, and the new document version retains the updated cache.
  • Unicode character count, Unicode whitespace-based word count, and str::lines() semantics (including trailing newlines) remain unchanged. Logical line count for rendering is separately updated based on LF changes.
  • The improvement is dramatic for large documents: on a 10 MB Markdown file, the isolated statistics computation drops from ~28 ms (full rescan) to ~0.054 µs (incremental update) — approximately 500,000× faster for typical single-point edits. This measurement covers only the statistics algorithm itself; the full editing path includes text replacement, syntax parsing, and rendering.
  • The cached path is used only when a valid cache exists and the edit is not a full-document replacement. When no cache exists, or when the entire document is replaced, the existing lazy-compute-then-invalidate behavior is preserved. The document's String, Markdown parsing, Visual Edit, Japanese IME, save, and undo implementations are unchanged.

Fixes

  • Windows tests now normalize path separators, closing failures caused by comparing Unix and Windows path styles.
  • Visual Edit CJK linked-prose wrapping now renders correctly when a link spans CJK characters.

Compatibility

  • No migration is required for Markdown files, preferences, or workspace data. The statistics semantics and document model remain unchanged; only the performance of incremental updates improves.
  • Platform notes are unchanged: the Windows installers are unsigned and may require a SmartScreen bypass; the macOS DMGs remain ad-hoc signed and are not notarized, so a browser-downloaded ad-hoc app may require xattr -cr /Applications/Markion.app or download with curl -LO.

Downloads

  • Windows x64: NSIS installer and portable .zip.
  • macOS Apple Silicon: DMG (aarch64).
  • macOS Intel: DMG (x64).
  • Linux x86_64: DEB, RPM, and AppImage.

Verification

  • Local workspace test suite passes (cargo test --workspace).
  • Native CI builds and packaging pass on Windows, macOS (Apple Silicon and x86_64 cross-compiled), and Linux, including the no-GPU AppImage smoke test; the updater installers are signed and mirrored with a version-matched update.json.

Full comparison: v0.4.13...v0.5.1


Markion v0.5.1(中文说明)

性能优化版本,带来增量文档统计更新、Windows 测试改进与 Visual Edit 中文/日文/韩文链接散文换行修复。

主要更新

增量文档统计(PR #23,由 @snchngny 提交)

  • 字符数、单词数、行数现在在每次编辑时增量更新,而不再重新扫描整个文档。当缓存的统计数据有效时,使用替换范围加前后各一个字符来计算差异,新的文档版本保留更新后的缓存。
  • Unicode 字符计数、基于 Unicode 空白的单词计数、str::lines() 语义(包括末尾换行)保持不变。用于渲染的逻辑行数根据 LF 变化单独更新。
  • 对于大型文档,改进效果显著:在 10 MB Markdown 文件上,独立的统计计算从约 28 ms(全文重扫)降至约 0.054 µs(增量更新)——对于典型的单点编辑,速度提升约 50 万倍。此测量仅覆盖统计算法本身;完整的编辑路径还包括文本替换、语法解析与渲染。
  • 缓存路径仅在有效缓存存在且编辑不是全文替换时使用。当无缓存或整个文档被替换时,保留现有的惰性计算然后失效的行为。文档的 String、Markdown 解析、Visual Edit、日文输入法、保存与撤销实现均未改变。

修复

  • Windows 测试现在规范化路径分隔符,消除因比较 Unix 与 Windows 路径风格导致的失败。
  • Visual Edit 中文/日文/韩文链接散文换行现在在链接跨越中文/日文/韩文字符时正确渲染。

兼容性

  • Markdown 文件、偏好设置、工作区数据均无需迁移。统计语义与文档模型保持不变;仅增量更新的性能得到改进。
  • 平台说明不变:Windows 安装包未签名,可能需要绕过 SmartScreen;macOS DMG 为 ad-hoc 签名且未经公证,浏览器下载的 ad-hoc 应用可能需要 xattr -cr /Applications/Markion.app 或改用 curl -LO 下载。

下载

  • Windows x64:NSIS 安装程序与便携 .zip。
  • macOS Apple Silicon:DMG(aarch64)。
  • macOS Intel:DMG(x64)。
  • Linux x86_64:DEB、RPM 与 AppImage。

验证

  • 本地 workspace 测试套件通过(cargo test --workspace)。
  • Windows、macOS(Apple Silicon 与交叉编译的 x86_64)及 Linux 原生 CI 构建与打包通过,包括无 GPU 的 AppImage 冒烟测试;更新器安装包已完成签名,并与版本匹配的 update.json 一同镜像分发。

完整变更对比: v0.4.13...v0.5.1