This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: multiple input files to one output file


> > Linda is mentioning "thousands of files"... 
> > It may be worthwhile to check that the files are closed and the
> > resources released for each iteration of the for-each loop.
> > Do you know if it's the case ?
> 
> Oh, I bet they are closed, but I also bet they have all been read into
> memory as source trees before processing begins. Yowch. 

Yes, it is potentially a problem. Saxon won't read and parse the document
until the document() function is executed, but it will then hold the tree in
memory - it has to, because if document() is called again with the same URI,
it has to return the same tree. So the garbage collector won't get any
chance to clear up. Perhaps an explicit free() mechanism is needed (but that
gets into questions of sequence of execution and side-effects).

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]