Skip to content

Commit

Permalink
force gc after each batch write
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian Goina committed Apr 1, 2024
1 parent daf6614 commit 13f8c46
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ private <M extends AbstractNeuronEntity, T extends AbstractNeuronEntity> void ru
i, resultsBatch.size(),
(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / _1M + 1, // round up
(Runtime.getRuntime().totalMemory() / _1M));
System.gc(); // force garbage collection after each batch
});
} else {
NeuronMatchesWriter<CDMatchEntity<M, T>> cdsResultsWriter = getCDSMatchesWriter();
Expand Down

0 comments on commit 13f8c46

Please sign in to comment.