commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janek Bogucki <>
Subject RE: XML / SAX heavy optimization !
Date Fri, 05 Sep 2003 13:14:26 GMT
On Wed, 2003-09-03 at 23:49, SPRINGER,IAN (HP-NewJersey,ex1) wrote:
> Hi Tom,
> One thing you could do that won't make a huge difference but couldn't hurt
> is when you do the typical if/else element name checks in start/endElement,
> check for for the more frequently occuring elements first. This will reduce
> the number of calls to String.equals() being done for each element.
> Ian
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

You could also try turning on string-interning in the parser and then
use object identity tests instead of String.equals().

If you are building an object model from the SAX callbacks you could
look at XOM which allows you to not build nodes you are not interested
in rather than build the whole model and then detach the nodes


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

View raw message