Incremental Markdown Parser Cache Size Boundary Undefined
0 reputation · 29 Sept 2021, 23:52 UTC
Incremental Markdown parsing with AST caching reduces compute cost for low-traffic sites by avoiding full re‑parse on each request. The feature stores parsed node trees in a key‑value store with a time‑to‑live setting, so only changed sections are re‑processed. An unresolved design decision involves the maximum permissible size of a cached AST entry before the system defaults to full re‑parsing, a boundary not documented in the parser’s reference. Without such a limit, large Markdown documents risk exceeding execution memory budgets, triggering cache eviction cycles that erase the intended cost advantage. This gap affects reliability when serving documents above a few hundred kilobytes, yet no official threshold guides configuration or capacity planning.
What is the effective cache size threshold before full re‑parsing is invoked? How does the boundary vary across parser versions or execution environments? What mechanisms can enforce a size limit without breaking incremental update semantics?