commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Shannon" <>
Subject Re: [digester] Re: Digester Quesion
Date Thu, 10 Feb 2005 13:42:33 GMT
Thanks Simon.

----- Original Message ----- 
From: "Simon Kitching" <>
To: "Jakarta Commons Users List" <>
Sent: Wednesday, February 09, 2005 7:08 PM
Subject: Re: [digester] Re: Digester Quesion

> On Wed, 2005-02-09 at 18:26 -0500, Luke Shannon wrote:
> > Hi All;
> >
> > Someone just looked at my code that uses Digester and commented that
> > thought it would be slow (compared to SAX or DOM directly) because it
> > need to use "reflection a lot".
> >
> > I am not sure what this means. But since I am using  digester a lot I
> > like to know if it is does use a lot of resources (compared to other XML
> > parsing API) and if there is anything I can do about it. If someone
> > point me to some reference articles that would be great too, I may need
> > present some evidence to support my choice of Digester.
> Yes, Digester does use reflection to invoke methods on your classes, and
> that does carry a small performance penalty. Hand-coded SAX-based code
> will be faster. Anything using DOM will be slower, as DOM has its own
> penalties that far outweigh those of Digester.
> But if you really cared about performance, you wouldn't be writing your
> application in java anyway, right? Nor using XML which is much slower
> than binary-encoded data formats.
> In most cases, the performance difference between Digester and
> hand-coded SAX handling just isn't significant. Ok, maybe if you're
> repeatedly processing massive volumes of xml in some kind of
> performance-critical manner (eg a newspaper print-preparation system)
> you should look at some alternatives. But even then you need to take
> into account the costs of development and maintenance (lower when using
> a decent library rather than hand-coding) vs the costs incurred by the
> slightly lower performance.
> You can find a list of alternatives to digester here:
> Regards,
> Simon
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message