From: Jim Procter Date: Tue, 12 Jul 2016 15:36:31 +0000 (+0100) Subject: JAL-1381 JAL-2110 efficiency TODO X-Git-Tag: Release_2_10_0~140^2~5^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2c2992b8822b686f7f12022a66aa41f6969d06d0;hp=4eb1ed22600411fe5b6e9ac93084b45429ccfad6;p=jalview.git JAL-1381 JAL-2110 efficiency TODO --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 17aab15..37f225c 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -2558,7 +2558,8 @@ public class AlignmentUtils if (!unmapped.contains(seq)) { char[] newSeq = new char[width]; - Arrays.fill(newSeq, gap); + Arrays.fill(newSeq, gap); // JBPComment - doubt this is faster than the + // Integer iteration below int newCol = 0; int lastCol = 0; @@ -2590,6 +2591,7 @@ public class AlignmentUtils System.arraycopy(newSeq, 0, tmp, 0, lastCol + 1); newSeq = tmp; } + // TODO: optimise SequenceI to avoid char[]->String->char[] seq.setSequence(String.valueOf(newSeq)); realignedCount++; } @@ -2639,6 +2641,8 @@ public class AlignmentUtils { SequenceI alignedSequence = alignedDatasets.get(seq .getDatasetSequence()); + // TODO: getSequenceAsString() will be deprecated in the future + // TODO: need to leave to SequenceI implementor to update gaps seq.setSequence(alignedSequence.getSequenceAsString()); }