Merge lp:~mvo/software-center/use-lxml into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 3087
Proposed branch: lp:~mvo/software-center/use-lxml
Merge into: lp:software-center
Diff against target: 26 lines (+5/-1)
2 files modified
debian/control (+1/-0)
softwarecenter/db/categories.py (+4/-1)
To merge this branch: bzr merge lp:~mvo/software-center/use-lxml
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+118752@code.launchpad.net

Description of the change

use python-lxml instead of buildin xml.etree as the former is quite a bit
faster. On ARM its the different against trunk:92,90s vs 71s,74s

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

A small change but a very nice speedup, thanks mvo!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2012-07-10 12:51:32 +0000
3+++ debian/control 2012-08-08 13:58:24 +0000
4@@ -38,6 +38,7 @@
5 python-aptdaemon.gtk3widgets,
6 python-dbus,
7 python-defer,
8+ python-lxml,
9 policykit-1,
10 policykit-1-gnome | policykit-1-kde,
11 python-xdg,
12
13=== modified file 'softwarecenter/db/categories.py'
14--- softwarecenter/db/categories.py 2012-06-25 17:40:17 +0000
15+++ softwarecenter/db/categories.py 2012-08-08 13:58:24 +0000
16@@ -25,7 +25,10 @@
17 import string
18 import xapian
19
20-from xml.etree import ElementTree as ET
21+# we use that instead of xml.etree.ElementTree because its quite a bit
22+# after, especially on slow machines like ARM
23+import lxml.etree as ET
24+
25 from xml.sax.saxutils import escape as xml_escape
26 from xml.sax.saxutils import unescape as xml_unescape
27

Subscribers

People subscribed via source and target branches