MemoryHandlerOptions
Nodepod API / src / MemoryHandlerOptions
Interface: MemoryHandlerOptions
Section titled “Interface: MemoryHandlerOptions”Defined in: src/memory-handler.ts:99
Properties
Section titled “Properties”budgetMB?
Section titled “budgetMB?”
optionalbudgetMB?:number
Defined in: src/memory-handler.ts:101
Soft per-pod memory budget in MB. Default: 400.
evictPackageContent?
Section titled “evictPackageContent?”
optionalevictPackageContent?: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.
heapWarnThresholdMB?
Section titled “heapWarnThresholdMB?”
optionalheapWarnThresholdMB?:number
Defined in: src/memory-handler.ts:117
Heap usage threshold in MB to trigger pressure callbacks. Default: 350
manifestCacheSize?
Section titled “manifestCacheSize?”
optionalmanifestCacheSize?:number
Defined in: src/memory-handler.ts:109
LRU capacity for package.json manifest cache. Default: 256
maxProcessOutputBytes?
Section titled “maxProcessOutputBytes?”
optionalmaxProcessOutputBytes?:number
Defined in: src/memory-handler.ts:121
Max process stdout/stderr accumulation in bytes. Default: 4194304 (4MB)
moduleSoftCacheSize?
Section titled “moduleSoftCacheSize?”
optionalmoduleSoftCacheSize?:number
Defined in: src/memory-handler.ts:115
Max modules before trimming node_modules entries. Default: 512
monitorIntervalMs?
Section titled “monitorIntervalMs?”
optionalmonitorIntervalMs?:number
Defined in: src/memory-handler.ts:119
Monitoring poll interval in ms. Default: 30000
packPackageContent?
Section titled “packPackageContent?”
optionalpackPackageContent?: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.
pathNormCacheSize?
Section titled “pathNormCacheSize?”
optionalpathNormCacheSize?:number
Defined in: src/memory-handler.ts:103
LRU capacity for path normalization cache. Default: 2048
residentContentBudgetMB?
Section titled “residentContentBudgetMB?”
optionalresidentContentBudgetMB?:number
Defined in: src/memory-handler.ts:130
Package content kept in main-thread memory with evictPackageContent. Default: 128
resolveCacheSize?
Section titled “resolveCacheSize?”
optionalresolveCacheSize?:number
Defined in: src/memory-handler.ts:107
LRU capacity for module resolve cache. Default: 4096
statCacheSize?
Section titled “statCacheSize?”
optionalstatCacheSize?:number
Defined in: src/memory-handler.ts:105
LRU capacity for stat result cache. Default: 512
transformCacheMaxBytes?
Section titled “transformCacheMaxBytes?”
optionaltransformCacheMaxBytes?:number
Defined in: src/memory-handler.ts:113
Approximate UTF-16 byte budget for transformed source. Default: 24 MiB
transformCacheSize?
Section titled “transformCacheSize?”
optionaltransformCacheSize?:number
Defined in: src/memory-handler.ts:111
LRU capacity for source transform cache. Default: 512