summaryrefslogtreecommitdiff
path: root/coverage/annotate.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-10-23 22:19:26 -0400
committerNed Batchelder <ned@nedbatchelder.com>2013-10-23 22:19:26 -0400
commite743e94e540341465175a489e82f67d3da071e77 (patch)
treecf42b8af9cfcd84019478bf8b567325535da071b /coverage/annotate.py
parent9a54cb40b10ec08b5d4a6c6c88aadc5c5a343726 (diff)
downloadpython-coveragepy-e743e94e540341465175a489e82f67d3da071e77.tar.gz
Use sets as much as possible to speed HTML reports. Seems to be a 10% speedup.
Diffstat (limited to 'coverage/annotate.py')
-rw-r--r--coverage/annotate.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/coverage/annotate.py b/coverage/annotate.py
index b7f32c1..5c39678 100644
--- a/coverage/annotate.py
+++ b/coverage/annotate.py
@@ -2,6 +2,7 @@
import os, re
+from coverage.backward import sorted # pylint: disable=W0622
from coverage.report import Reporter
class AnnotateReporter(Reporter):
@@ -59,9 +60,9 @@ class AnnotateReporter(Reporter):
dest_file = filename + ",cover"
dest = open(dest_file, 'w')
- statements = analysis.statements
- missing = analysis.missing
- excluded = analysis.excluded
+ statements = sorted(analysis.statements)
+ missing = sorted(analysis.missing)
+ excluded = sorted(analysis.excluded)
lineno = 0
i = 0