You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{ssz}from"@lodestar/types";importsnappyfrom"@chainsafe/snappy-stream";// could be any dataconstsingleBlockBytes=ssz.bellatrix.SignedBeaconBlock.serialize(ssz.bellatrix.SignedBeaconBlock.defaultValue());asyncfunctionmemTest(): Promise<void>{constcount=1_000_000_000;for(leti=0;i<count;i++){conststream=snappy.createCompressStream();stream.write(singleBlockBytes);stream.end();if(i%100_000===0){awaitnewPromise((resolve)=>setTimeout(resolve,100));const{heapTotal, rss}=process.memoryUsage();console.log("Memory usage",Math.floor((i*100)/count)+"%","heapTotal",toMem(heapTotal),"rss",toMem(rss));}}}
There is a rss memory leak issue found from ChainSafe/lodestar#4623
to reproduce:
some output
heap total is not leaked but rss keeps increasing, it seems
"@chainsafe/fast-crc32c"
is the root causeThe text was updated successfully, but these errors were encountered: