• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

humanspeak / svelte-markdown / 25450592446
93%
main: 81%

Build:
Build:
LAST BUILD BRANCH: perf/shrink-html-tokens-single-pass
DEFAULT BRANCH: main
Ran 06 May 2026 06:04PM UTC
Jobs 1
Files 126
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 May 2026 05:25PM UTC coverage: 93.478% (+0.05%) from 93.424%
25450592446

push

github

web-flow
perf(streaming): reuse parser on prop appends + add perf-bench harness (#285)

* feat(perf): add perf-bench harness for parse and render baselines

Mirrors the structure of the sibling svelte-virtual-chat perf-bench so
optimization commits can be attributed to a specific before/after delta.

- New /test/perf-bench route with preset-driven scenarios (1KB, 50KB,
  500KB, HTML-heavy, table-heavy, cache-warm x100, stream 30/s) and a
  parseable [data-testid="perf-stats"] line emitting per-doc gauges
  (parseColdMs, parseWarmMs, lexMs, cleanupMs, hashMs, firstPaintMs,
  domNodes, charsPerSec) plus rolling-10s observer metrics (longtask,
  LoAF, rAF p95, mutations, heap alloc).
- scripts/perf-bench.mjs: Playwright headless runner; runs each
  scenario COLD then WARM and prints structured JSON.
- package.json: perf:bench script.
- Root test glossary: link to the new route.

No library code changes; all timing hooks call already-exported utils.

* perf(streaming): reuse incremental parser on append-only prop updates

When the source prop is extended (the typical LLM token-by-token case),
syncStreamingSourceFromProp now detects the append and keeps the
existing IncrementalParser, instead of forcing a fresh parser on every
chunk. The fresh-parser path drops prevTokens, collapses divergeAt to
0, and re-renders the full token tree.

Imperative writeChunk() already preserved the parser; this brings
prop-source streaming to parity. Per-chunk render p95 drops ~4x on the
perf-bench stream-30tps scenario (11.9ms -> 2.7ms WARM).

Pinned by a unit test that spies on lexAndClean and asserts the second
parse only re-lexes the appended tail thanks to the parser's
tail-window optimization.

482 of 551 branches covered (87.48%)

Branch coverage included in aggregate %.

8 of 8 new or added lines in 1 file covered. (100.0%)

980 of 1013 relevant lines covered (96.74%)

5470.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 node-22 - 25450592446.1 06 May 2026 06:04PM UTC 126
93.48
GitHub Action Run
Source Files on build 25450592446
  • Tree
  • List 126
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25450592446
  • 4206d55f on github
  • Prev Build on fix/katex-delimiter-boundaries (#25441572443)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc