After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743293 - validate: launcher: Use cElementTree for XML parsing
validate: launcher: Use cElementTree for XML parsing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-21 12:46 UTC by Ramiro Polla
Modified: 2015-02-17 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
validate: launcher: Use cElementTree for XML parsing (1.12 KB, patch)
2015-01-21 12:53 UTC, Ramiro Polla
needs-work Details | Review
validate: launcher: Use cElementTree for XML parsing (1.05 KB, patch)
2015-01-21 15:03 UTC, Ramiro Polla
none Details | Review

Description Ramiro Polla 2015-01-21 12:46:28 UTC
Using cElementTree instead of ElementTree speeds up parsing of media descriptor files.
Comment 1 Ramiro Polla 2015-01-21 12:53:47 UTC
Created attachment 295093 [details] [review]
validate: launcher: Use cElementTree for XML parsing

Using cElementTree instead of ElementTree speeds up parsing of media
descriptor files.

The total time spent parsing XML files drops from ~0.64 s to ~0.24 s,
leading to faster initialisation times for gst-validate-launcher.
Comment 2 Thibault Saunier 2015-01-21 14:37:03 UTC
Review of attachment 295093 [details] [review]:

::: validate/launcher/baseclasses.py
@@ +36,3 @@
+    import xml.etree.cElementTree as ET
+except ImportError:
+    import xml.etree.ElementTree as ET

It looks like it is distributed with python since python 2.5 so you can just import it unconditionnally
Comment 3 Ramiro Polla 2015-01-21 15:03:08 UTC
Created attachment 295106 [details] [review]
validate: launcher: Use cElementTree for XML parsing

Using cElementTree instead of ElementTree speeds up parsing of media
descriptor files.

The total time spent parsing XML files drops from ~0.64 s to ~0.24 s,
leading to faster initialisation times for gst-validate-launcher.
Comment 4 Thibault Saunier 2015-02-17 16:30:40 UTC
Attachment 295106 [details] pushed as 2d5ad1a - validate: launcher: Use cElementTree for XML parsing