RE: sgml-parse and GC

Subject: RE: sgml-parse and GC
From: Peter Nilsson <pnidv96@xxxxxxxxxxxxxx>
Date: Thu, 22 Jul 1999 17:07:04 +0200 (CEST)
On Thu, 22 Jul 1999, Didier PH Martin wrote:

> Hi Peter,
> 
> > Didier says:
> > About grove caching, I am not so sure that keeping a grove is a good
> thing.
> > For example, the main grove (i.e. the grove created for the processed
> > document) could be released as soon as the (process-children) procedure is
> > finished on the Root . Same thing for a grove returned from a sgml-parse
> 
> Peter said:
> Then the whole FOT is constructed, and all DSSSL processing done so this
> won't buy you much.
> 
> Didier says:
> Ad contrario, this gives you something. Again, take the example where you
> want to process a collection of documents. All documents are included in a
> SGML/XML document as below:
> [...]

Well, by "the main grove", I thought you ment the grove (document)
specified on the jade command line. When *it* is processed, you're almost
done with the DSSSL processing and freeing it then is useless. But in
general of course, freeing the groves could be worth it.

> Didier says:
> Good points. Then we probably need to introduce an explicit construct that
> state that the grove is released as soon as the whole process-children is
> done on the whole grove. The script writer knows the processing context. So,
> maybe a construct like (process-and-release-node-list) or something similar
> would do the job. I agree, that current implementation has limitation on

Maybe sgml-parse-no-cache (as an external procedure) would be easier,
since it is the grove that is cached (not node lists in general). It
would:
- Check if sysid is in cache and return the cached grove.
- Otherwise load it but not put it in the cache.

Hopefully, the reference counting mechanism will keep the nodes in memory
as long as necessary, but I'm not sure.

Shouldn't be hard trying.

regards,
/Peter Nilsson
--
'(?P . (?e . (?t . (?e . (?r)))))


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread