Mafarricos/xbmctorrent — pull request #4 by Mafarricos (2014-10-21 09:14:50+00:00)
Title: Use lxml, a fast XML parser, whenever possible

This commit replaces ElementTree from python standard library with lxml, if
available. lxml is API compatible, so no changes besides the import are needed.

Python standard library also has cElementTree, a C optimized version of the
module, but is not compatible with xbmc. There are bugs reported about this and
I totally failed when trying to use it on this xbmc addon.

Replacing it by lxml only in tvdb is quite nice because it reduces the time to
show the seasons for Saturday Night Live on EZTV from ~60 seconds to ~7 seconds
on my raspberry pi. This is particulary notable on shows with lots of seasons
because the XML file tends to be bigger and takes more time to parse.

For completeness only, this is also changed on all the other files that parse
XML files.