Re: [xml] 2.5.x performance vs. 2.4.24



On Wed, Aug 13, 2003 at 11:44:08AM -0700, Grant Goodale wrote:
      Sample document attached.  The command I've used for testing is:

      xmllint --timing --noout --memory ./test.xml

  Seems I found a very nice way to waste CPU cycles:
    1/ take a large XML document in a memory buffer
    2/ consume a few bytes of it
    3/ repack the buffer moving all unused memory to the beginning
       of the buffer
    4/ repeat to 2/ until buffer empty
 of course the operation in 3 is a memmove especially ugly for the cache.
2 lines patch fixed in CVS, while I was at it I avoid now processing 
all UTF-8 intput though a void UTF-8 to UTF-8 converter.

   Sorry about that, it was quadratic but hard to detect for relatively
small documents, I assume this was introduced recently ! It happened only
when parsing from a memory buffer, which usually is not done for large
document.
   The 1 line patch is now in CVS, thanks for the report,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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