Re: [xml] Lower speed with greater xmlParseChunk() chunks?

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Sun Oct 15 2000 - 16:27:23 EDT


On Sun, Oct 15, 2000 at 10:04:47PM +0200, rolf@pointsman.de wrote:
> The appended demo program shows the problem (already mailed privately
> to Daniel). Choose a CHUNKSIZE at the beginning of the file, compile
> it with something like gcc -o demo demo.c -lxml and run it with ./demo
> <XML file>. Then choose another CHUNKSIZE and do it again. If you use,
> let's say, 1024 for the first try and 102400 for the second you will
> see a great difference in executing time with the same input data (at
> least for me the later is around 3 times slower than the first.)

  Wayne analysis was right, the shrink operation was trashing
memory on large buffers !

  Problem fixed, will be in 2.2.5 which I still expect to release
within an hour :-)

~/XML -> ls -l tst.xml
-rw-rw-r-- 1 veillard www 136238126 Oct 15 22:11 tst.xml

with the default 100KB buffer as provided:

~/XML -> time ./demo tst.xml
39.82user 1.45system 0:43.96elapsed 93%CPU

  Modified to use 1024 bytes buffer:

~/XML -> gcc -Iinclude -o demo demo.c -L.libs -lxml -lz
~/XML -> time ./demo tst.xml
40.92user 1.91system 0:44.81elapsed 95%CPU

  And recompiled again using a 1Meg buffer

~/XML -> time ./demo tst.xml
40.73user 1.72system 1:15.36elapsed 56%CPU

  It ran successully my testsuite but this kind of fixes can have
side effects. In case people experience problems with large file try
to reverse the enclosed patch.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe


----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 16:43:15 EDT