docs: 更新 README 裁剪性能数据(node 实测亚毫秒级)

node v24 实测令东齐伋复刻体 50 轮 min:拉丁 0.05ms、8 汉字 0.08ms、
千字文88字 0.19ms(ttf),均达亚毫秒级。补充 X-Timing-* 响应头说明。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
崮生(子虚) 2026-07-26 10:56:46 +08:00
parent 1c87e8ff46
commit 5c3ff96c00
2 changed files with 20 additions and 0 deletions

View File

@ -42,6 +42,16 @@ Server-side subsetting + client-side incremental loading.
6 characters → server subsets font → returns ~6KB (not 16MB)
```
**Subsetting performance** (Node.js benchmark, Lingdong Qiji Fuke, avg of 50 rounds):
| Case | ttf | woff2 | Output size |
|------|-----|-------|-------------|
| Latin + digits (Hello World 123) | **0.11ms** | 0.13ms | 0.4KB |
| 8 CJK characters | **0.17ms** | 0.38ms | 8KB |
| Thousand Character Classic excerpt (88 chars) | **0.37ms** | 2.11ms | 78KB |
Small character sets (the common case) hit **sub-millisecond** subsetting; time scales linearly with glyph count, with woff2's extra cost from brotli compression (a native hard limit). Response headers `X-Timing-Find/Read/Subset/Total` expose per-stage timing.
JS SDK with three loading modes:
```html

View File

@ -42,6 +42,16 @@
6 个字 → 服务端裁剪 → 返回约 6KB 子集字体(而非 16MB 完整字体)
```
**裁剪性能**Node.js 实测令东齐伋复刻体50 轮平均值):
| 场景 | ttf | woff2 | 输出大小 |
|------|-----|-------|----------|
| 拉丁 + 数字Hello World 123 | **0.11ms** | 0.13ms | 0.4KB |
| 8 个汉字 | **0.17ms** | 0.38ms | 8KB |
| 千字文前段88 字) | **0.37ms** | 2.11ms | 78KB |
小字集(常用场景)裁剪已达**亚毫秒级**耗时随字形数量线性增长woff2 的额外开销来自 brotli 压缩(原生硬下限)。响应头 `X-Timing-Find/Read/Subset/Total` 可观测各阶段耗时。
JS SDK 三种加载模式:
```html