Skip to content

v0.7.1

Choose a tag to compare

@tannevaled tannevaled released this 21 Oct 06:32
c2f2d89
go install github.com/go-slides/slides/cmd/slides@v0.7.1

A performance release, with no change in output or API.

  • Caches (#36): built-in themes are parsed once per process. Project themes, packed style sheets and highlighted code blocks go through small caches keyed by content: 32 themes, 16 style sheets and 256 code blocks of at most 8 KiB. A deck whose style changes on every keystroke cannot make them grow, and a changed theme replaces its cached entry.
  • Fewer copies (#37, #38): the line marker used for scroll sync copies plain text in runs instead of byte by byte; a fuzz test against the old version found no difference in 4.1 M runs. Each render reuses one writer for text and code.

The editor render of the 100-slide deck allocates 5.7 MB instead of 11.4 MB. In WebAssembly it takes 17.9 ms instead of 35.9 ms. The VS Code preview after an edit takes 24 ms at Go's default GOGC, level with Marp for VS Code's 23 ms; it took 44 ms with v0.7.0. The first preview takes 52 ms, against Marp's 78 ms.