[jdom-interest] Speed!? JDOM vs DOM

Cameron Smith cameron.smith at entranet.co.uk
Tue Mar 6 08:34:33 PST 2001


Rolf, your performance comparison is interesting.  However unless you run
the test enough times to stabilise results (so that random factors and VM
setup costs don't affect them) the results aren't that meaningful.  When
benchmarking JDom versus an in-house parser I found that results only
stabilised at 100k - 150k test cycles.  Admittedly this was with a much
shorter XML document (about 100 lines) but even given this you would perhaps
need to run at least 1000 cycles.

Secondly, I think the performance argument can be overstated when discussing
XML libraries.  The biggest advantage of JDom versus DOM is the usability of
its API.  The DOM interfaces are ugly and lead to extra programmer resource
spent on writing utility code to make them more user-friendly (but for all
that, they are still a de facto standard, and thus wonderful!). Therefore if
you are really concerned about performance you can spend some of the
man-hour savings on chunkier hardware.

Finally, you need to consider what proportion of your total processing time
will be spent parsing/generating XML.  For my applications, 'XML time' is a
fairly small fraction of total transaction time (which includes several
other costly tasks including network and database transactions).  Therefore
the speed of parsers is not that important.
On the other hand, from the looks of it you are dealing with pretty large
documents so 'XML time' could be a much bigger part of your total processing
time.

cameron

	Cameron Smith, Software Developer
	Entranet Ltd

	Email:   cameron.smith at entranet.co.uk	
	Tel:      44 (0) 131 247 7400
Fax:      44 (0) 131 247 7404

	
----------------------------------------------------------------------------
---------------------------------
	The information contained in this email and any attachment is
intended for and confidential to the addressee(s) only.

	If you have received this information in error and you are neither
the addressee nor an authorised recipient of the addressee, please notify
Entranet on 01491 878785 immediately and delete the email from your system.
Please note the information contained in, or attached to this email must not
be used, copied, or disseminated in any way.

	Unless approved literature of Entranet is included, any views or
opinions expressed are those of the sender and do not necessarily represent
those of Entranet.

	Please note Entranet accepts no liability for any viruses, which may
be transmitted in or with this email, nor does it accept responsibility for
any such data corruption, interception or unauthorised amendment which can
occur as a result of internet/email communications.
	 

	Entranet - creators of online commerce
	<http://www.entranet.co.uk/>

	Entranet Limited
	Registered office - 4 Thames Court, Goring-On-Thames, Reading RG8
9AQ
	Registered in England No. 3267855
	
----------------------------------------------------------------------------
---------------------------------




More information about the jdom-interest mailing list