Skip to content

MemoryHandlerOptions

Nodepod API


Nodepod API / src / MemoryHandlerOptions

Defined in: src/memory-handler.ts:99

optional budgetMB?: number

Defined in: src/memory-handler.ts:101

Soft per-pod memory budget in MB. Default: 400.


optional evictPackageContent?: boolean

Defined in: src/memory-handler.ts:128

Keep installed package content (node_modules restored from the package cache) out of main-thread memory and read files back from the cache on demand. Needs SharedArrayBuffer (lean spawn snapshots) and the package snapshot cache. Default: false.


optional heapWarnThresholdMB?: number

Defined in: src/memory-handler.ts:117

Heap usage threshold in MB to trigger pressure callbacks. Default: 350


optional manifestCacheSize?: number

Defined in: src/memory-handler.ts:109

LRU capacity for package.json manifest cache. Default: 256


optional maxProcessOutputBytes?: number

Defined in: src/memory-handler.ts:121

Max process stdout/stderr accumulation in bytes. Default: 4194304 (4MB)


optional moduleSoftCacheSize?: number

Defined in: src/memory-handler.ts:115

Max modules before trimming node_modules entries. Default: 512


optional monitorIntervalMs?: number

Defined in: src/memory-handler.ts:119

Monitoring poll interval in ms. Default: 30000


optional packPackageContent?: boolean

Defined in: src/memory-handler.ts:139

Keep node_modules files that no process has read lately deflated in main-thread memory (about 4x smaller), inflating each on its next read. Rounds run in the background: shortly after an install (compressed off the main thread, holding off while processes read packages or the preview loads a page), and otherwise once the pod has been quiet for a while. Needs lean spawn snapshots (SharedArrayBuffer). Default: true.


optional pathNormCacheSize?: number

Defined in: src/memory-handler.ts:103

LRU capacity for path normalization cache. Default: 2048


optional residentContentBudgetMB?: number

Defined in: src/memory-handler.ts:130

Package content kept in main-thread memory with evictPackageContent. Default: 128


optional resolveCacheSize?: number

Defined in: src/memory-handler.ts:107

LRU capacity for module resolve cache. Default: 4096


optional statCacheSize?: number

Defined in: src/memory-handler.ts:105

LRU capacity for stat result cache. Default: 512


optional transformCacheMaxBytes?: number

Defined in: src/memory-handler.ts:113

Approximate UTF-16 byte budget for transformed source. Default: 24 MiB


optional transformCacheSize?: number

Defined in: src/memory-handler.ts:111

LRU capacity for source transform cache. Default: 512