Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

PerformanceConfig

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

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:219

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:236

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.