From 1404665ed8870771c47fb132273275b1f6a5ab7a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 23 Oct 2013 22:19:26 -0400 Subject: Use sets as much as possible to speed HTML reports. Seems to be a 10% speedup. --- coverage/xmlreport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/xmlreport.py') diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index 78375249..26ac02ad 100644 --- a/coverage/xmlreport.py +++ b/coverage/xmlreport.py @@ -117,7 +117,7 @@ class XmlReporter(Reporter): branch_stats = analysis.branch_stats() # For each statement, create an XML 'line' element. - for line in analysis.statements: + for line in sorted(analysis.statements): xline = self.xml_out.createElement("line") xline.setAttribute("number", str(line)) -- cgit v1.2.1