@2018kguo/rill
A drop-in replacement for Streamdown that's much faster. Same DOM, byte for byte.
npm install @2018kguo/rill
- import { Streamdown } from "streamdown";
+ import { Streamdown } from "@2018kguo/rill/streamdown";
With @streamdown/code, change that import too, and the page stops shipping Shiki:
- import { code } from "@streamdown/code";
+ import { code } from "@2018kguo/rill/code";
Same component, same props, same page. On a throttled phone profile (Chromium, CPU throttled 10×), Streamdown vs rill:
| Scenario | Finished sooner | Less JS execution time (main thread) |
|---|---|---|
| Open a chat of 18 long answers | 4.4× | 6.6× |
| Open a code-heavy chat | 8.2× | 11.9× |
| Stream a 56 KB answer | 5.2× | 13.7× |
- How it works
- Benchmarks, with raw results and how to rerun them
- Customizing: your own plugins, as a custom build
- Reference: setup per bundler, every entry point, plugins, fallbacks
MIT. Source: github.com/2018kguo/rill