[jdom-interest] Speed!? JDOM vs DOM

GB/DEV - Philip Nelson philip.nelson at omniresources.com
Tue Mar 6 06:33:15 PST 2001


> So, what is the advantage of JDOM when it is so much slower than DOM??
> 

The project has been focusing on fuctionality first and will optimize before
the 1.0 release.  I think JDOM will speed up.  A good portion of a 7-12
second run in any xml app is the initial startup and there are many ways to
improve on that issue.  The real advantage I see to JDOM would be when
actually try to *use* some of that data, particularly if the structure of
the document is at all complex.  JDOM vs DOM is a no brainer.  If the
stucture is simple, then SAX will always be your fastest bet though the
difference is kind of lost in the wash on small documents. Also, you
probably ran with the defaults and that means you used Xerces.  One
advantage of JDOM is that if a faster parser becomes available, you will
only have change the part of the code that determines which parser to use,
assuming a Builder is available for it.  In my experience, unless you
religiously stick to the DOM interfaces, you will find a feature of your
parser that makes your life easier and then it'll have you locked in!  



More information about the jdom-interest mailing list