"Uwe Schmidt" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > this statement isn't true in general. HXT itself can be incremental, if > there > is no need for traversing the whole XML tree. When processing a document > containing a DTD, indeed there is a need even when no validation is > required, > for traversal because of the entity substitution.
It would be nice if HXT was incremental even when you are processing the whole tree. If I remember correctly, the data type of the tree in HXT is something like data Tree = Tree NodeData [Tree] which means that already processed parts of the tree can't be garbage collected because the parent node is holding onto them. If instead it was data Tree = Tree NodeData (IORef [Tree]) Would could remove each subtree as it was processed (well just before would probably be necessary, and we would need to rely on blackholing to remove the reference on the stack). This would perhaps allow already processed subtree to be garbage collected. Together with the lazy evaluation this could lead to quite good memory usage. Rene. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe