Optimization
Manual memory optimization and GC.
1 min readEdit this page
Optimize
import { optimizer } from '@restjs/memory'
const result = await optimizer.optimize()
result.freedMb
result.gcTriggered
result.actionsGC
import { triggerGC, isGCAvailable } from '@restjs/memory'
if (isGCAvailable()) triggerGC()Enable with: node --expose-gc dist/main.js