Re: [xslt] Strange things with perfomance



On Thu, Dec 13, 2001 at 06:00:32PM +0300, Anton V. Boyarshinov wrote:
> Thu, 13 Dec 2001 09:14:22 -0500 
> Daniel Veillard <veillard@redhat.com> ΞΑΠΙΣΑΜ(Α):
> 
> 
> DV> Since you did not provide useful information to debug what may
> DV> actually
> DV> happen, forget about getting a useful answer anyway I can just try to
> DV> guess.
> 
> I've provide a document in attachment. I can provide a stylesheet, but
> IMHO it should not make differance while document parsing.

  Oops I didn't see the attachment.
Yes I confirm the delay is certainly caused by fetching the DTD

> DV> Because xsltproc is a conformant XSLT processor and then uses
> DV> parses the DTD associated to the document if you have a DOCTYPE.
> 
> I've try with --novalid option but result was the same :(

  try --nonet

orchis:~/tmp -> xsltproc --novalid --timing --noout  identity.xsl bookmarks.xml  
Parsing stylesheet identity.xsl took 1 ms
xmlNanoHTTPConnectAttempt: Error connecting to remote host - Connection refusedxmlNanoHTTPConnectAttempt: Error connecting to remote host - Connection refusedbookmarks.xml:2: warning: failed to load external entity "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd";
ange Language 1.0//EN//XML" "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd
                                                                              ^
Parsing document bookmarks.xml took 4576 ms
Applying stylesheet took 17 ms
orchis:~/tmp -> xsltproc --nonet --timing --noout  identity.xsl bookmarks.xml 
Parsing stylesheet identity.xsl took 1 ms
Attempt to load network entity http://www.python.org/topics/xml/dtds/xbel-1.0.dtd 
Parsing document bookmarks.xml took 21 ms
Applying stylesheet took 8 ms
orchis:~/tmp -> 

> I've think: "it's strange: parse time is big". I've try xmllint that uses
> the same xml parser -- libxml. I've got grately different results. I've
> think: "it's very strange if different programms based on the same parser
> have so different parse times". I've write into list.

  Okay, I overreacted a bit...
Still parsing the DTD is a requirement of XPath processing and of XSLT.
The real solution is to install a local catalog providing the DTD needed
for your processing.

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]