From 430c5793c5f0e039e06f856acbc62eef42a1641c Mon Sep 17 00:00:00 2001
From: Thomas Sibley <trsibley@uw.edu>
Date: Thu, 21 Aug 2014 15:03:57 -0700
Subject: [PATCH] MarkDuplicates: Comment out optical duplicate tracking

On some inputs, MarkDuplicates seems to take orders of magnitude longer
with a runtime out of proportion to the input size.  Inspecting the
output of jstack -F seems to show the Java thread stuck in
findOpticalDuplicates().  strace showed almost 100% of syscall time
spent in futex().  The process would sometimes succeed after a while and
sometimes lead to a JVM crash.  Since this tracking is just metrics
bookkeeping and doesn't affect the resulting sam/bam, just disable it!

This cut runtime from 100-170 minutes to 2-3 minutes for one such
"weird" input file containing only ~950k reads.
---
 src/java/picard/sam/MarkDuplicates.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/java/picard/sam/MarkDuplicates.java b/src/java/picard/sam/MarkDuplicates.java
index c625905..a9cf0a7 100644
--- a/src/java/picard/sam/MarkDuplicates.java
+++ b/src/java/picard/sam/MarkDuplicates.java
@@ -689,7 +689,7 @@ public class MarkDuplicates extends AbstractDuplicateFindingAlgorithm {
             }
         }
 
-        trackOpticalDuplicates(list);
+        //trackOpticalDuplicates(list);
     }
 
     /**
-- 
1.8.4

