Skip to content

Performance

How fast go-slides builds a deck, in how much memory, measured against marp-cli on the same machine.

These figures are for v0.3.0, which renders slides concurrently and parses its fonts once (go-slides/slides#11).

go-slides and marp-cli 4.5.1 were run as subprocesses on the same decks, on an Apple M4 Max (16 CPUs) with a 1-minute load average under 8, five interleaved rounds after a warm-up. Time is the median wall time; memory is the peak of the whole process tree (marp-cli drives a Chrome, whose processes count).

DeckOutputgo-slidesmarp-cligo-slides memorymarp-cli memory
100 slidesHTML36 ms315 ms47 MiB140 MiB
100 slidesPDF1.14 s1.88 s242 MiB1,509 MiB
100 slidesPNG, every slide0.97 s5.44 s225 MiB1,354 MiB
100 slidesPPTX3.39 s8.03 s530 MiB1,373 MiB
gaia, 20 slidesPDF283 ms1.57 s154 MiB1,315 MiB
math and code, 20 slidesPNG, every slide250 ms2.32 s168 MiB1,286 MiB

Why it is fast

  • No browser to start. marp-cli launches Chrome for every PDF, image and PPTX export; go-slides renders with go-webengine inside its own process.
  • Slides render in parallel, four at a time by default, and each image is written as soon as it is its turn: a long deck is never held in memory as images.
  • Fonts are parsed once per process, not once per slide.

What it does not win

  • PDF size. Each slide is an image in the PDF, where Chrome prints text and vectors: 10 MiB against 837 KiB for the 100-slide deck.
  • CPU time on big decks. Four workers spend more CPU than the wall time shows: 3.2 s against marp-cli’s 2.7 s for the 100-slide PDF.
  • Memory is an upper bound for marp-cli: Chrome’s processes share pages that the sum counts in each. Its largest single process is 220–320 MiB.

The method, every deck and mode, and the commands to reproduce the figures are in BENCHMARKS.md.

Created on by tannevaled

Modified on by tannevaled