Skip to content

Streaming Markdown benchmark methodology

This page describes the benchmark scenarios we use or plan to use for measuring streaming Markdown renderer performance. Run pnpm benchmark:1.0 for current markstream-vue release-gate data.

Cross-renderer comparison results are not published yet.

Tested packages (planned and current)

PackageFrameworkNotes
markstream-vueVue 3content mode / nodes mode
markstream-reactReactcontent mode / nodes mode
react-markdownReactstatic baseline
streamdownReactstreaming-focused baseline
markdown-itparserparser-only baseline
markedparserparser-only baseline

Scenarios

ScenarioSizeChunk patternIncludes
short chat5 KB20-char chunksparagraphs, lists
long answer20 KBtoken chunkscode, lists, links
reasoning answer100 KBparagraph chunkscode, tables
technical doc1 MBparagraph chunksheadings, tables, code
diagram-heavy50 KBblock chunksMermaid, KaTeX

How to reproduce

bash
pnpm install
pnpm benchmark:1.0

The benchmark script:

  1. Generates Markdown content at various sizes
  2. Simulates streaming by delivering content in chunks
  3. Measures render time, DOM updates, and memory usage
  4. Outputs results to the console and generates report files

1.0 Benchmark Report

For detailed performance data for markstream-vue 1.0, run:

bash
pnpm benchmark:1.0

See the generated report at 1.0 Benchmark Report for:

  • Raw timing data
  • Memory profiles
  • Streaming split performance
  • Package versions and commit SHA

Performance characteristics (markstream-vue 1.0 only)

For markstream-vue 1.0 release-gate data, refer to the 1.0 Benchmark Report. Cross-framework and cross-renderer comparison numbers require additional benchmark fixtures and will be published separately.

Methodology notes

  • Benchmarks run on Node.js for parser-level tests and in browser (Playwright) for renderer-level tests
  • Content is generated to simulate realistic AI output patterns (code blocks, tables, math, diagrams)
  • Streaming is simulated at 20-char chunks delivered at 30Hz
  • Memory is measured via performance.memory (Chrome) and heap snapshots (Node.js)