From f204908a9449d727691920de83a1dfdb1d1fed04 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Fri, 11 Jan 2013 14:19:32 -0500 Subject: [PATCH] Add some todos for future optimization to LIBS --- .../sting/utils/locusiterator/ReadStateManager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java b/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java index 74caef6a7..2dcf01d72 100644 --- a/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java +++ b/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java @@ -84,6 +84,7 @@ class ReadStateManager { * @return Iterator over the reads associated with that sample. */ public Iterator iterator(final String sample) { + // TODO -- why is this wrapped? return new Iterator() { private Iterator wrappedIterator = readStatesBySample.get(sample).iterator(); @@ -138,6 +139,18 @@ class ReadStateManager { } // fast testing of position + + /** + * TODO -- this function needs to be optimized + * + * Notes: + * -- the only place where it's called is in a block where we know isEmpty is false + * -- getFirst() is quite expensive, and it seems that we could cache this value in the outer + * block, and then pass this in as an argument + * + * @param read + * @return + */ private boolean readIsPastCurrentPosition(GATKSAMRecord read) { if (isEmpty()) return false;