This is an automated email from the git hooks/post-receive script. tille pushed a commit to branch master in repository mummer.
commit 9e623381055a56b8264265d19772867e5f4394f5 Author: Andreas Tille <ti...@debian.org> Date: Sun Feb 4 16:06:43 2018 +0100 improve performance of delta2maf --- debian/changelog | 6 +++ .../0009-improve-performance-of-delta2maf.patch | 56 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 63 insertions(+) diff --git a/debian/changelog b/debian/changelog index 49ee10a..2cc077e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mummer (3.23+dfsg-3) UNRELEASED; urgency=medium + + * improve performance of delta2maf + + -- Fabian Klötzl <fab...@kloetzl.info> Thu, 17 Nov 2016 21:44:58 +0200 + mummer (3.23+dfsg-2) unstable; urgency=medium * Deactivate broken patch from mugsy that was taken over in last Debian diff --git a/debian/patches/0009-improve-performance-of-delta2maf.patch b/debian/patches/0009-improve-performance-of-delta2maf.patch new file mode 100644 index 0000000..885c402 --- /dev/null +++ b/debian/patches/0009-improve-performance-of-delta2maf.patch @@ -0,0 +1,56 @@ +From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fab...@kloetzl.info> +Date: Fri, 5 Aug 2016 14:14:02 +0200 +Subject: improve performance of delta2maf + +--- + src/tigr/delta2maf.cc | 23 ++++++++++++++++++++--- + 1 file changed, 20 insertions(+), 3 deletions(-) + +diff --git a/src/tigr/delta2maf.cc b/src/tigr/delta2maf.cc +index f397f35..f47d797 100644 +--- a/src/tigr/delta2maf.cc ++++ b/src/tigr/delta2maf.cc +@@ -378,8 +378,8 @@ void printAlignments + + { + +- const char * IdR; +- const char * IdQ; ++ const char * IdR, *previous_IdR = NULL; ++ const char * IdQ, *previous_IdQ = NULL; + + map<string, char *>::iterator finditer; + +@@ -405,6 +405,7 @@ void printAlignments + long int sR, eR, sQ, eQ; + long int Apos, Bpos; + long int SeqLenR, SeqLenQ; ++ long int previous_SeqLenR = 0, previous_SeqLenQ = 0; + int frameR, frameQ; + + //for ( i = 0; i < LINE_PREFIX_LEN; i ++ ) +@@ -426,7 +427,23 @@ void printAlignments + //printf("Looking for R:\"%s\" in map of size %d\n",IdR,seqsMap.size()); + assert(finditer != seqsMap.end()); + R = finditer->second; +- SeqLenR = strlen(R+1); ++ // SeqLenR = strlen(R+1); ++ ++ /** ++ * We don't want to recompute the length of a sequence for each ++ * iteration. This is especially important as many pairwise alignments ++ * are split into blocks and we thus do the same thing over and over ++ * again. ++ * ++ * My solution is to simply cache the current length value and reuse ++ * it in the next iteration given the IDs are equal. This speeds up ++ * the code by a factor of 20 (in words: twenty). ++ * ++ * -- Fabian Klötzl 2016-03-11 ++ */ ++ SeqLenR = IdR == previous_IdR ? previous_SeqLenR : strlen(R + 1); ++ previous_IdR = IdR; ++ previous_SeqLenR = SeqLenR; + + if(DATA_TYPE == NUCMER_DATA){ + seqsiter = seqsMapArray.find(make_pair(Ap->idR,1)); diff --git a/debian/patches/series b/debian/patches/series index 72bcb76..9cb30cf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,4 +5,5 @@ fix_sf_privacy_breach_issue.patch hardening.patch spelling.patch addition_from_mugsy.patch +0009-improve-performance-of-delta2maf.patch # most probably broken see bug #843621 addition_from_report_duplicates.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/mummer.git _______________________________________________ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit