Skip to content

PerformanceConfig

Defined in: packages/engine/src/constants/Configuration.ts:63

Performance-related configuration. Controls caching, timeouts, and processing limits to prevent runaway resource consumption on large documents.

readonly defaultCacheSize: number;

Defined in: packages/engine/src/constants/Configuration.ts:74

Maximum number of entries in ExpressionEngine’s bytecode cache (per-instance, keyed by expression text) before the oldest entry is evicted. Raise this for documents with many distinct expressions if repeated re-evaluation (e.g. scrolling) is re-parsing instead of hitting cache, bug fix (release hardening pass): this field used to be read nowhere; the cache size was a hardcoded, unconfigurable constant. Note this does NOT bound LineCache, which has no size limit of its own.


readonly maxDocumentLines: number;

Defined in: packages/engine/src/constants/Configuration.ts:91

Maximum lines a document may have for the engine to process it in one pass. Enforced by ExpressionEngine.parseDocument() and by engine/DocumentModel.ts’s setDocument(), the two entry points that take a whole document.

A document costs memory per line whatever each line says: a parsed line record, a cache entry, a dependency-graph node. Two hundred thousand lines of 1 + 1 therefore exhausted the heap and aborted the process before any per-line limit had anything to object to, which is the same shape of hole as an unbounded expression and needs the same kind of ceiling. Refusing the document names the limit; a host that genuinely has a larger one raises this field.

Release hardening: declared and read nowhere until now.