[xml] libxml2 v2.5.7 appears much slower than libxml2 v2.4.24



Hi all

* My toolchain is as follows:
docbook-dtd             4.2
docbook-xsl             1.61.3
libxml2 (old)   2.4.24
libxml2 (new)   2.5.7
Linux                   2.4.9-e.24enterprise



* libxml2 v2.5.7 seems dramatically (about 20x) slower than libxml2 v2.4.24
in my environment:

$ time $PD/libxml2/2.4.24/bin/xmllint --noout --postvalid --xinclude update_schema.dbk
$PD/libxml2/2.4.24/bin/xmllint --noout --postvalid --xinclude   2.75s user 0.71s system 70% cpu 4.895 total

$ time $PD/libxml2/2.5.7/bin/xmllint --noout --postvalid --xinclude update_schema.dbk
$PD/libxml2/2.5.7/bin/xmllint --noout --postvalid --xinclude update_schema.db  73.19s user 7.62s system 83% 
cpu 1:36.34 total



* Here is the strace -c output:

$ strace -c -f $PD/libxml2/2.4.24/bin/xmllint --noout --postvalid --xinclude update_schema.dbk
execve("/sbcimp/run/pd/libxml2/2.4.24/bin/xmllint",
["/sbcimp/run/pd/libxml2/2.4.24/bin/xmllint", "--noout", "--postvalid", "--xinclude", "update_schema.dbk"], 
[/* 233 vars */]) = 0
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 64.40    0.492642         411      1198        49 stat64
 18.76    0.143504         219       654        65 open
 10.28    0.078624          32      2487           read
  4.91    0.037533           2     16225           brk
  0.54    0.004110           7       585           munmap
  0.49    0.003719           6       589           close
  0.34    0.002573           4       597           old_mmap
  0.15    0.001139           2       589           fstat64
  0.14    0.001053           2       584           _llseek
  0.00    0.000030           6         5           getcwd
  0.00    0.000017           4         4           mprotect
  0.00    0.000002           2         1           uname
------ ----------- ----------- --------- --------- ----------------
100.00    0.764946                 23518       114 total

$ strace -c -f $PD/libxml2/2.5.7/bin/xmllint --noout --postvalid --xinclude update_schema.dbk
execve("/sbcimp/run/pd/libxml2/2.5.7/bin/xmllint",
["/sbcimp/run/pd/libxml2/2.5.7/bin/xmllint", "--noout", "--postvalid", "--xinclude", "update_schema.dbk"], 
[/* 233 vars */]) = 0
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 70.67   10.850226         330     32840       652 stat64
 21.92    3.364601         204     16532        65 open
  4.51    0.692042          10     69912           read
  0.80    0.122842           7     16463           munmap
  0.67    0.103006           6     16467           close
  0.54    0.082402           2     42806           brk
  0.45    0.069392           4     16475           old_mmap
  0.23    0.035191           2     16467           fstat64
  0.19    0.029081           2     16460           _llseek
  0.02    0.003760           7       531           getcwd
  0.00    0.000021          21         1           write
  0.00    0.000018           5         4           mprotect
  0.00    0.000002           2         1           uname
  0.00    0.000001           1         1           time
------ ----------- ----------- --------- --------- ----------------
100.00   15.352585                244960       717 total



* The problem seems to be that v2.5.7 opens files from the DTD package far more often than does the previous 
version.  For example:

$ strace -e trace=stat64 -o strace.out -f $PD/libxml2/2.4.24/bin/xmllint --noout --postvalid --xinclude 
update_schema.dbk
$ grep /home/ruscoekm/my_tree/links/CORE/links/docbook-dtd/ent/iso-pub.ent strace.out|wc -l
     40

$ strace -e trace=stat64 -o strace.out -f $PD/libxml2/2.5.7/bin/xmllint --noout --postvalid --xinclude 
update_schema.dbk
$ grep /home/ruscoekm/my_tree/links/CORE/links/docbook-dtd/ent/iso-pub.ent strace.out|wc -l
   1162



Any thoughts on what is happening here.  Is this a known issue or am I doing something wrong?

Best wishes
Kevin Ruscoe

+ANYTHING+BELOW+WAS+ADDED+AFTER+I+HIT+SEND+

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]