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 647312 - Streaming API slow on documents with many xml:id's
Streaming API slow on documents with many xml:id's
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-09 20:21 UTC by Jakub Wilk
Modified: 2021-07-05 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test-case producer (79 bytes, application/x-sh)
2012-11-28 19:00 UTC, Jakub Wilk
Details

Description Jakub Wilk 2011-04-09 20:21:08 UTC
I'm trying to parse documents with large amounts of xml:id's using the streaming API. I noticed that libxml2 is puzzlingly slow; my measurements suggests that the running time is quadratic:

$ sh make-long-xml.sh 200000 | ( time xmllint --stream --noout - )

real    0m2.027s
user    0m1.032s
sys     0m0.048s

$ sh make-long-xml.sh 400000 | ( time xmllint --stream --noout - )

real    0m4.335s
user    0m3.232s
sys     0m0.096s

$ sh make-long-xml.sh 800000 | ( time xmllint --stream --noout - )

real    0m12.786s
user    0m11.501s
sys     0m0.208s

$ sh make-long-xml.sh 1600000 | ( time xmllint --stream --noout - )

real    0m47.626s
user    0m45.691s
sys     0m0.620s
Comment 1 Jakub Wilk 2012-11-28 19:00:55 UTC
Created attachment 230111 [details]
test-case producer

Attaching the script I used to produce test cases.
Comment 2 Daniel Veillard 2012-11-29 02:23:21 UTC
Interesting, I will have a look at it, a simple profiler output
will probably show the culprit !

Daniel
Comment 3 GNOME Infrastructure Team 2021-07-05 13:22:24 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.