Demos
Six demos, one idea each. All run the real pele package in your browser; most run Mermaid.js beside it on the same text.
- Demo 1TypingBoth libraries redraw on every keystroke. Compare the times.
- Demo 2StreamingA diagram redrawn on each chunk of an AI answer.
- Demo 3ThemingChange CSS variables. Pele recolours without a redraw.
- Demo 4Narrow screensResize the viewport. Pele changes the layout; Mermaid.js scales the drawing.
- Demo 5200 diagrams on one pageHow long each library takes to draw a long documentation page.
- Demo 6Untrusted inputScripts, bad links and oversized diagrams, and what reaches the page.
How the timings are taken
Both libraries are fully downloaded before a timing starts, both render the same Mermaid text, and times are measured with performance.now() in your own browser. Pele's numbers are the median of recent renders, after a few warm-up renders, which is what an editor sees once you've been typing for a second. Mermaid.js uses its default settings with securityLevel: 'strict'.