ext-apps/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Olivier Chafik 30a78b60b4
perf(pdf-server): share cache across server instances and dedupe form parsing (#637)
* perf(pdf-server): share cache across server instances and dedupe form parsing

In stateless HTTP deployments createServer() is called per request, so
the per-instance pdfCache and the 4 MB viewer HTML were discarded after
every call. Hoist both to module scope.

Also refactor extractFormSchema/extractFormFieldInfo to accept an
already-parsed PDFDocumentProxy so display_pdf downloads and parses the
PDF once instead of twice.

* perf(pdf-server): cap total cache bytes with LRU eviction

The module-level sharedPdfCache could grow unbounded within the 60s
lifetime window under a burst of distinct URLs. Track running total
bytes and evict least-recently-used entries on insert when it would
exceed CACHE_MAX_TOTAL_BYTES (256MB). getCacheEntry now bumps the
accessed entry to the end of insertion order so eviction targets the
LRU entry rather than the oldest insert.

createPdfCache takes an optional maxTotalBytes for testability.
2026-04-24 15:57:58 +01:00
..
basic-host chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
basic-server-preact chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
basic-server-react chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
basic-server-solid chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
basic-server-svelte chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
basic-server-vanillajs chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
basic-server-vue chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
budget-allocator-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
cohort-heatmap-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
customer-segmentation-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
debug-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
integration-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
map-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
pdf-server perf(pdf-server): share cache across server instances and dedupe form parsing (#637) 2026-04-24 15:57:58 +01:00
qr-server fix(qr-server): pass host/port to FastMCP for Docker compatibility (#372) 2026-04-24 11:35:13 +01:00
quickstart chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
say-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
scenario-modeler-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
shadertoy-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
sheet-music-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
system-monitor-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
threejs-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
transcript-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
video-resource-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
wiki-explorer-server chore: bump ext-apps to 1.7.0 (#628) 2026-04-21 16:19:22 +01:00
run-all.ts add EXAMPLE=folder-name support for tests & basic-host (#292) 2026-01-19 20:16:37 +00:00