Skip to content

Commit 3052f3f

Browse files
committed
Garbage collect every 100 files when loading in initial data
1 parent 0709465 commit 3052f3f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

js/PayMaker.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ const loadData = (ctx /*:Context_t*/, done) => {
627627
let nt = nThen;
628628
files.forEach((f, i) => {
629629
nt = nt((w) => {
630+
if (!(i % 100)) { garbageCollect(ctx); }
630631
const fileName = ctx.workdir + '/' + f;
631632
let dateFile = '<unknown date>';
632633
fileName.replace(/paylog_([0-9]+)_/, (all, x) => {

0 commit comments

Comments
 (0)