Skip to content

Commit 71dc686

Browse files
chaxusclaude
andcommitted
docs: changelog + campaign record for the production font-caching fix (first open 4min+ -> 61s, second open 4s)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c2c2bfe commit 71dc686

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ notes. Entries describe what users experience, not internal refactors.
4141

4242
### Fixed
4343

44+
- Opening a document that uses many fonts (typical for Chinese decks) no
45+
longer sits on "Loading presentation" for minutes on the hosted site: the
46+
editor's font files and the conversion engine are now cached long-term by
47+
the browser, so a second open of the same document takes seconds instead
48+
of re-downloading tens of megabytes.
49+
4450
- Words carrying a phonetic guide (Japanese furigana / Chinese pinyin
4551
"ruby" annotations) no longer disappear from a Word document on open and
4652
save; the base word is kept. The guide text itself is still dropped

‎docs/changelogs/2026-08-15-v9-regression-campaign.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,19 @@ gh workflow run nightly-corpus.yml -f limit=300 # 手动触发夜间
208208
- 新增 image-insert.spec(xlsx/pptx URL 插图后保存含 media)、font-cache.spec(第二次打开
209209
字体全部走缓存,回归守护另一会话修的线上字体无缓存问题;进线上冒烟集);
210210
pdf-route.spec 也进线上冒烟集。
211+
- **(08-16 晨)线上"PPT 永久 Loading、本地正常"根因**:索引字体
212+
`/fonts/NNN`(无扩展名)没有任何 Cache-Control 规则 → Pages 给
213+
`max-age=0` / `cf-cache-status: DYNAMIC`;sw.js 里字体跳过规则按
214+
`.ttf/.woff` 扩展名匹配、索引字体漏网落进 SWR,其 `cache:'no-cache'`
215+
重验证每次完整重下。SDK 字体加载是串行队列,EMP deck 拉 32 文件 /
216+
37.6MB(其中 20 个是 Word/Slide `IsNeedDefaultFonts` 强制的
217+
Arial/Times/Courier ×4 面,文档根本没用),逐文件耗时 3s→89s→165s→
218+
214s+,`isDocumentLoadComplete` 一直 false。修法 `a2a4010`:`_headers`
219+
把 `/fonts/*` 与 `x2t.wasm.gz` 设 immutable(sdkjs/web-apps 故意不设,
220+
含我们的 patch 与 iframe HTML),sw.js 对这两种形状 cache-first。线上
221+
实测:首开 4 分钟+未完成 → 61s 完成;**第二次打开 4s**(30 字体全缓存)。
222+
**待用户在 CF 控制台做**:Pages 对无扩展名路径边缘不缓存
223+
(`cf-cache-status` 仍 DYNAMIC),需加 Cache Rule `/fonts/*` → eligible
224+
for cache,才能让**首次**打开也从边缘命中。更长期:SDK 默认字体全家桶
225+
(20 文件)对纯浏览器版本是纯浪费,可评估在 `prepareEditorIframe`
226+
里关闭 `IsNeedDefaultFonts` 或裁减为文档实际引用的字体。

0 commit comments

Comments
 (0)