[jdom-interest] Performance of DOMBuilder vs. SAXBuilder

Yuri Kantorovich YKantorovich at c-bridge.com
Wed Jun 13 12:36:18 PDT 2001

Hello everyone,

When we used SAXBuilder the time to translate an array of bytes to Jdom
object was around 59000 mills. For DOMBuilder the time is about
500 mills.

So for us DOMBuilder is 100 times faster.
Can anybody help us to understand that.
Can it have any side affects?

Here is a snippet of a code:

InputStream in =  new ByteArrayInputStream(b);
			DOMBuilder builder = new DOMBuilder();
	       //	SAXBuilder builder = new SAXBuilder();
/*temp*/	        long start = System.currentTimeMillis();

			document = builder.build(in);
/*temp*/	        long d = System.currentTimeMillis() - start;
/*temp*/	         System.out.println("BaseMessageResponse: Time to
build document: " + d);

The application runs on an AIX machine.(IBM RS6000, B50, dual processor,1G
of RAM)


More information about the jdom-interest mailing list