Re: [xml] dtd and relaxng performance



On Tue, Feb 17, 2004 at 04:09:38PM +0100, Petr Pajas wrote:
For DTD validation I used xmllint --timing --notime with either
- --dtdvalid or --relaxng and put the parsing and validating times to
parse, dtd and rng columns. Parsing and compilation of the DTD was so
quick that it's not worth mentioning.

  Hum, this seems to be related to ID/IDREF checking, apparently
a lot of time is spent in xmlListLowerSearch() called from
xmlListInsert() itself called from xmlAddRef() when a new reference
is found.
  I don't think that ID/IDREF checking can be handled in a purely
linear manner, but it's quite possible that the existing algorithm
could be improved quite a lot (good point is that the list module 
internals are not exposed and can be hacked to speed this up).
  Also the way the built tests are make can affect this a lot
if you copied a large number of time the same fragment, you would
always hit the same values for IDs and IDREFs and possibly hit the
worse performing scenario.

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]