Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions benchmarks/results/browser.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"trace": "claude-markdown",
"approach": "markdown as received",
"renders": 146,
"renderMsTotal": 90,
"renderMsTotal": 60,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.8,
Expand All @@ -20,8 +20,8 @@
{
"trace": "claude-markdown",
"approach": "markdown paced",
"renders": 288,
"renderMsTotal": 118,
"renders": 291,
"renderMsTotal": 103,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
Expand All @@ -31,8 +31,8 @@
{
"trace": "claude-markdown",
"approach": "markdown paced, unit word",
"renders": 242,
"renderMsTotal": 106,
"renders": 239,
"renderMsTotal": 77,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
Expand All @@ -58,14 +58,14 @@
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
"maxElements": 293,
"maxElements": 298,
"textComplete": true
},
{
"trace": "fast",
"approach": "markdown as received",
"renders": 44,
"renderMsTotal": 32,
"renderMsTotal": 26,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
Expand All @@ -75,8 +75,8 @@
{
"trace": "fast",
"approach": "markdown paced",
"renders": 108,
"renderMsTotal": 52,
"renders": 111,
"renderMsTotal": 38,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.8,
Expand All @@ -86,11 +86,11 @@
{
"trace": "fast",
"approach": "markdown paced, unit word",
"renders": 105,
"renderMsTotal": 46,
"renders": 102,
"renderMsTotal": 35,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.8,
"frameP95Ms": 16.7,
"maxElements": 90,
"textComplete": null
},
Expand All @@ -113,47 +113,47 @@
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
"maxElements": 374,
"maxElements": 390,
"textComplete": true
},
{
"trace": "long",
"approach": "markdown as received",
"renders": 946,
"renderMsTotal": 856,
"longTasks": 0,
"longTaskMs": 0,
"renderMsTotal": 753,
"longTasks": 1,
"longTaskMs": 90,
"frameP95Ms": 16.7,
"maxElements": 450,
"textComplete": null
},
{
"trace": "long",
"approach": "markdown paced",
"renders": 1525,
"renderMsTotal": 1153,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.8,
"renders": 1516,
"renderMsTotal": 1116,
"longTasks": 2,
"longTaskMs": 206,
"frameP95Ms": 16.7,
"maxElements": 450,
"textComplete": null
},
{
"trace": "long",
"approach": "markdown paced, unit word",
"renders": 1300,
"renderMsTotal": 1032,
"renders": 1283,
"renderMsTotal": 917,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
"frameP95Ms": 16.8,
"maxElements": 450,
"textComplete": null
},
{
"trace": "long",
"approach": "plain text as received",
"renders": 946,
"renderMsTotal": 20,
"renderMsTotal": 14,
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.7,
Expand All @@ -168,7 +168,7 @@
"longTasks": 0,
"longTaskMs": 0,
"frameP95Ms": 16.8,
"maxElements": 214,
"maxElements": 209,
"textComplete": true
}
]
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/results/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"date": "2026-10-16",
"node": "v24.3.0",
"frameMs": 16.666666666666668,
"build": "v0.2.1",
"build": "v0.2.2",
"versions": {
"smooth-stream-text": "0.2.1",
"smooth-stream-text": "0.2.2",
"ai": "7.0.142"
},
"traces": [
Expand Down
26 changes: 13 additions & 13 deletions benchmarks/results/size.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"meta": {
"date": "2026-10-16",
"version": "0.2.1",
"version": "0.2.2",
"bundler": "esbuild 0.28.2, minified, ESM, target es2020, react/vue/svelte external"
},
"results": [
Expand All @@ -13,21 +13,21 @@
},
{
"name": "react: useSmoothText",
"minBytes": 20751,
"gzipBytes": 8396,
"brotliBytes": 7733
"minBytes": 11013,
"gzipBytes": 4795,
"brotliBytes": 4497
},
{
"name": "react: SmoothText",
"minBytes": 20137,
"gzipBytes": 8187,
"brotliBytes": 7548
"minBytes": 19589,
"gzipBytes": 8003,
"brotliBytes": 7426
},
{
"name": "react: everything",
"minBytes": 22006,
"gzipBytes": 8873,
"brotliBytes": 8195
"minBytes": 22043,
"gzipBytes": 8888,
"brotliBytes": 8210
},
{
"name": "dom: createSmoothText",
Expand All @@ -37,9 +37,9 @@
},
{
"name": "vue: useSmoothStream",
"minBytes": 20731,
"gzipBytes": 8354,
"brotliBytes": 7752
"minBytes": 10806,
"gzipBytes": 4729,
"brotliBytes": 4435
},
{
"name": "svelte: smoothStream",
Expand Down
36 changes: 18 additions & 18 deletions benchmarks/results/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Streams

smooth-stream-text 0.2.1 built from `v0.2.1`, AI SDK `ai` 7.0.142, 2026-10-16.
smooth-stream-text 0.2.2 built from `v0.2.2`, AI SDK `ai` 7.0.142, 2026-10-16.

| Stream | Origin | Characters | Chunks | Duration | Pattern |
| --- | --- | --- | --- | --- | --- |
Expand Down Expand Up @@ -220,33 +220,33 @@ Chromium 156.0.8078.4 (headless), Apple M1 Pro, 10 cores, 16 GB, darwin, 2026-10

| Stream | Approach | Renders | Render time (ms) | Long tasks | Frame p95 (ms) | Peak elements |
| --- | --- | --- | --- | --- | --- | --- |
| claude-markdown | markdown as received | 146 | 90 | 0 | 16.8 | 90 |
| claude-markdown | markdown paced | 288 | 118 | 0 | 16.7 | 90 |
| claude-markdown | markdown paced, unit word | 242 | 106 | 0 | 16.7 | 90 |
| claude-markdown | markdown as received | 146 | 60 | 0 | 16.8 | 90 |
| claude-markdown | markdown paced | 291 | 103 | 0 | 16.7 | 90 |
| claude-markdown | markdown paced, unit word | 239 | 77 | 0 | 16.7 | 90 |
| claude-markdown | plain text as received | 146 | 2 | 0 | 16.8 | 0 |
| claude-markdown | plain text paced + reveal | n/a | n/a | 0 | 16.7 | 293 |
| fast | markdown as received | 44 | 32 | 0 | 16.7 | 90 |
| fast | markdown paced | 108 | 52 | 0 | 16.8 | 90 |
| fast | markdown paced, unit word | 105 | 46 | 0 | 16.8 | 90 |
| claude-markdown | plain text paced + reveal | n/a | n/a | 0 | 16.7 | 298 |
| fast | markdown as received | 44 | 26 | 0 | 16.7 | 90 |
| fast | markdown paced | 111 | 38 | 0 | 16.8 | 90 |
| fast | markdown paced, unit word | 102 | 35 | 0 | 16.7 | 90 |
| fast | plain text as received | 44 | 1 | 0 | 16.7 | 0 |
| fast | plain text paced + reveal | n/a | n/a | 0 | 16.7 | 374 |
| long | markdown as received | 946 | 856 | 0 | 16.7 | 450 |
| long | markdown paced | 1525 | 1153 | 0 | 16.8 | 450 |
| long | markdown paced, unit word | 1300 | 1032 | 0 | 16.7 | 450 |
| long | plain text as received | 946 | 20 | 0 | 16.7 | 0 |
| long | plain text paced + reveal | n/a | n/a | 0 | 16.8 | 214 |
| fast | plain text paced + reveal | n/a | n/a | 0 | 16.7 | 390 |
| long | markdown as received | 946 | 753 | 1 | 16.7 | 450 |
| long | markdown paced | 1516 | 1116 | 2 | 16.7 | 450 |
| long | markdown paced, unit word | 1283 | 917 | 0 | 16.8 | 450 |
| long | plain text as received | 946 | 14 | 0 | 16.7 | 0 |
| long | plain text paced + reveal | n/a | n/a | 0 | 16.8 | 209 |

### Bundle size

smooth-stream-text 0.2.1, esbuild 0.28.2, minified, ESM, target es2020, react/vue/svelte external, 2026-10-16.
smooth-stream-text 0.2.2, esbuild 0.28.2, minified, ESM, target es2020, react/vue/svelte external, 2026-10-16.

| Import | Minified | gzip | brotli |
| --- | --- | --- | --- |
| core: createSmoothStream | 9.6 kB | 4.2 kB | 3.9 kB |
| react: useSmoothText | 20.3 kB | 8.2 kB | 7.6 kB |
| react: SmoothText | 19.7 kB | 8.0 kB | 7.4 kB |
| react: useSmoothText | 10.8 kB | 4.7 kB | 4.4 kB |
| react: SmoothText | 19.1 kB | 7.8 kB | 7.3 kB |
| react: everything | 21.5 kB | 8.7 kB | 8.0 kB |
| dom: createSmoothText | 17.1 kB | 7.0 kB | 6.5 kB |
| vue: useSmoothStream | 20.2 kB | 8.2 kB | 7.6 kB |
| vue: useSmoothStream | 10.6 kB | 4.6 kB | 4.3 kB |
| svelte: smoothStream | 10.1 kB | 4.4 kB | 4.1 kB |
| web-component | 19.9 kB | 7.9 kB | 7.4 kB |
Loading