On Tue, 23 Jan 2001, DeWitt Clinton wrote:
> On Tue, Jan 23, 2001 at 10:06:13AM +0000, Matt Sergeant wrote:
>
> > The only gain might be in a large DOM tree where there may be
> > thousands of objects. But then you're really better off using an
> > array based class instead (as I found out).
>
> This is getting a bit off-topic, but I'm empirically found that the
> DOM is not necessarily the best object model to use in a mod_perl
> environment. XML::DOM in particular has such a high overhead in terms
> of memory (and memory leaks) and performance, that it is sometimes
> inappropriate for a context that requires a small footprint, and
> generally fast throughput (like mod_perl).
I could have told you that for free :-)
However its not all doom and gloom - XML::XPath implements the DOM API,
and doesn't leak memory, and might be faster, and is certainly under more
active development...
But if performance is absolutely key in XML parsing/processing, then you
really need to be looking towards Orchard, which we're co-developing with
Ken MacLeod (author of the PerlSAX bindings and XML::Grove). Current tests
reveal that its about 10 times faster at parsing than any Perl tree based
parser and XPath resolution is about 6 times faster than current
XML::XPath and XML::XQL. Plus it garbage collects automatically (and
unlike Perl, really, truly, actually frees up its memory).
--
<Matt/>
/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\