Worker pooling, if per-job font indexing ever shows up in compile_duration_seconds #7

Open
opened 2026-08-26 04:49:54 +00:00 by jlxq0 · 0 comments
Owner

Migrated from Plan.md's "Deferred (do not drift into these)" section when that file was retired; open work belongs in issues, not in a file with no state. Nothing here is scheduled and no decision has been taken. Do not start it without an explicit go.

Every compile runs in a one-shot subprocess that exits after one document. That is not an accident to be optimised away: it is the containment for Typst's FileId interner, a permanently-leaked 16-bit counter that panics at 65 535 distinct paths, and for comemo's global memo cache. Neither is reclaimable in a long-lived process. Any pooling design must keep a hard ceiling on documents per worker.

The trigger is a measurement, not a preference. Open this only when per-job font indexing is visible in compile_duration_seconds. It is not visible today.

Plan.md's wording: "Worker pooling — only if per-job font indexing shows up in compile_duration_seconds."

Migrated from `Plan.md`'s "Deferred (do not drift into these)" section when that file was retired; open work belongs in issues, not in a file with no state. **Nothing here is scheduled and no decision has been taken.** Do not start it without an explicit go. Every compile runs in a one-shot subprocess that exits after one document. That is not an accident to be optimised away: it is the containment for Typst's `FileId` interner, a permanently-leaked 16-bit counter that panics at 65 535 distinct paths, and for `comemo`'s global memo cache. Neither is reclaimable in a long-lived process. Any pooling design must keep a hard ceiling on documents per worker. **The trigger is a measurement, not a preference.** Open this only when per-job font indexing is visible in `compile_duration_seconds`. It is not visible today. Plan.md's wording: "Worker pooling — only if per-job font indexing shows up in `compile_duration_seconds`."
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jlxq0/typst-mcp#7
No description provided.