From f72a0c3271e4a147a4b0b66b83eeebf1671ab0f2 Mon Sep 17 00:00:00 2001 From: tfenne Date: Thu, 20 Oct 2022 11:40:18 -0600 Subject: [PATCH] Tweak the size of caches for parallel consensus calling down to reduce memory usage. --- .../com/fulcrumgenomics/umi/ConsensusCallingIterator.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala b/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala index 449133c01..919c8d111 100644 --- a/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala +++ b/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala @@ -67,7 +67,7 @@ class ConsensusCallingIterator[ConsensusRead <: SimpleRead](sourceIterator: Iter groupingIterator.flatMap(caller.consensusReadsFromSamRecords) } else { - ParIterator(groupingIterator, threads=threads).flatMap { rs => + ParIterator(groupingIterator, threads=threads, chunkSize=threads * 16, chunkBuffer=1).flatMap { rs => val caller = callers.get() caller.synchronized { caller.consensusReadsFromSamRecords(rs) } }.toAsync(chunkSize * 8)