dom4j-dev  

[dom4j-dev] performance improvements for SAXReader

Mike Skells
Wed, 22 Feb 2006 12:54:04 -0800

 
Hi ,
I have been profiling an application that parses many thousand, ver small xml documents.
 
I have noticed that the impl,entation of the SAXReader consumes more CPU and generates more garbage form the initialisation of the XMLReader and the ContentHandler that it takes in the parsing
 
some small modifications to the SAXreader so that the XMLReader and ContentHandler are not is not re-initialised, yealded a four times less garbage and 3 fold less CPU usage
 
I am happy to contribute the changes if anyone is interested
 
profiling was from jprobe, against dom4j 1.6.1, xerces 2.7.1 and java 1.4.2
 
Mike
  • [dom4j-dev] performance improvements for SAXReader Mike Skells