'[xslt] "document() function memory usage"'
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: <xslt gnome org>
- Subject: '[xslt] "document() function memory usage"'
- Date: Mon, 29 Mar 2004 13:29:18 +0200
Hi,
on 3/24/2004 5:56 PM Kasimier Buchcik wrote:
> Hi,
>
> I'm trying to transform the W3C DOM-Test-Suite to Delphi. Doing this I
> have a stylesheet that loads about 520 XML files (2-4 KB) in a loop and
> processes them. Since the transformation eats all the memory on my test
> machine (256 MB real memory, 630 MB virtual memory), the question arises
> if the documents loaded by the following construct will be released on
> transformation end only:
>
> <xsl:for-each select="*[local-name() = 'suite.member']">
> <xsl:apply-templates select="document(@href)" />
> </xsl:for-each>
>
> (Note: the output method "text" is used; the transformation runs
> smoothly if only a few tests are processed)
>
> If they are released at transformation end only, could there be any way
> of implementing destruction of no more used documents, if
> xsl:apply-templates has been processed?
>
>
> Do some other explanations come to mind why this transformation uses so
> much memory?
Since there was no feedback on the issue, I assume some information was
missing - I'll try once more.
The question is: is a document, imported with the function "document()",
freed after the application of <xsl:apply-templates> in the example
above, or is it freed when the whole transformation has ended?
I'm asking this, since I tried to process many sub-documents with
document() and my machine ran out of memory. IOW, it feels like the
sub-document are cumulated in memory.
I'm running on a w2k machine and used xsltproc for the test:
L:\Open_idom\XPtest\w3c>xsltproc --version
Using libxml 20607, libxslt 10104 and libexslt 804
xsltproc was compiled against libxml 20607, libxslt 10104 and libexslt 804
libxslt 10104 was compiled against libxml 20607
libexslt 804 was compiled against libxml 20607
Regards,
Kasimier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]