xsl-list
[Top] [All Lists]

Re: [xsl] Speeding up collection()

2009-06-10 04:09:03
2009/6/10 Jesper Tverskov <jesper(_dot_)tverskov(_at_)gmail(_dot_)com>:
Andrew Welch wrote:
You could call out to Java to get the directory list:

Yes, I can use one of the general programming languages my XSLT
processor supports.

But is that really the method for the task at hand except when we only
have very few xml files to load?

It's a feature of the language that document(), doc() and
doc-available() all parse the document completely and then (as I
understand it) hold the document in memory, hence the need for the
saxon:discard-document() extension when you process any reasonable
number in one go.  (It's a shame there isn't an inbuilt equivalent of
saxon:discard-document() as it's essential for batch processing)

I don't know whether with collection() the processor has the freedom
not to load the document into memory until its needed, but I suspect
it would have to be a specific optimisation to not load it for
document-uri()

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>