Re: [xslt] Probable memory leak (when using document()?)



On 2005-01-29 08:45:06 -0500, Daniel Veillard wrote:
> On Sat, Jan 29, 2005 at 01:58:11PM +0100, Vincent Lefevre wrote:
> > But I think that any internal subset could be seen as a private DTD.
> > So, the DTD structures could be shared, and once an internal subset
> > is found, then the structures corresponding to external subsets could
> > be cloned[*] (even if this isn't needed a posteriori).
> 
>   Hum, really no this won't work in the general case. Entity A in the
> external subset may reuse entity B. Entity B can be redefined in the
> internal subset. The cached value of A loaded from a previous file
> just won't work.

I don't understand what you mean. Could you give an example?

I don't see why this wouldn't work since what I mean is that: As
long as two structures contain the same data, they are shared.
Once something is modified, a copy is performed.

>   And piling up command line options, i.e. non-general tweaks to the
> libxslt engine which would break "sometimes" sounds like a maintainance
> nightmare to me.

But requiring several dozens of MBs is even more a nightmare. Otherwise
the solutions are:
  * Use one big file instead of a set of small files. This isn't a good
    idea IMHO, for any file format / language. Imagine a big C project
    with only one .c file...
  * Do not use DTDs. But this means no validation and this would break
    some applications.

-- 
Vincent Lefèvre <vincent vinc17 org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]