Re: [xslt] xsltproc memory consumption w/ large DTD / docbook
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] xsltproc memory consumption w/ large DTD / docbook
- Date: Tue, 28 Jan 2003 16:13:52 -0500
On Tue, Jan 28, 2003 at 09:59:13PM +0100, Michael Weiser wrote:
> I've also tried narrowing down the source of that enormous memory
> consumption. I had a look at the stylesheet and the only extraordinary
> thing it does is loading those small external documents via document().
1/ document() parsing result *must* be kept in memory to comply
with generate-id() requirements.
2/ parsing an XML file in XSLT, one *must* load the DTD to
allow for defaulted attributes and ID/IDREF lookup, this is a
requirement of the XPath data model and applies to resources
loaded with document() too.
Knowing that the DocBook DTD is an huge beast and can require
as much as 3-4 Megabytes in the libxml2 DOM tree representation
your results are perfectly normal.
first point sharing DTD instances doesn't hold due to the
fact that XML 1.0 allows an internal subset and sharing
becomes a dangerous processing.
However I think that in the document() case the DTD parts
could be removed after the parsing process is finished. That
could solve your specific problem.
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]