[jdom-interest] Performance tuning

bob mcwhirter bob at werken.com
Mon Nov 26 13:37:50 PST 2001


Chances are, that's the JVM taking some time to load, verify
and link in the JDOM and Xerces classes.  Subsequent documents
should go faster.

Since you're talking about an interactive application, if
you can spin a background thread to read a minimal XML file
of some flavor, just to initialize everything, once the user
selects a file, reading should be fast.

Else, maybe instantiating (but not using) the SAXReader before
giving up the dialog would accomplish the same thing.

	-bob

On Mon, 26 Nov 2001, Bob Jacobsen wrote:

> I'm using JDOM and Xerxes SAX to read some configuration files for an 
> interactive application.  One a user button-click, I read one of the 
> files. Because the user is going to select one of about 300 
> configuration files, I can't usefully read them ahead of time.
> 
> A typical file is about 40K in very verbose form, uses a DTD and a 
> single namespace, and averages several attributes per element.  You 
> can see one at http://jmri.sourceforge.net/demoFiles/NMRA.xml.txt
> 
> The problem is that this file takes about 6 seconds to read and parse 
> on a 400MHz Powerbook.  This seems excessively long, esp. given some 
> of the benchmark times I've seen on the IBM website.  So clearly I'm 
> doing something wrong.
> 
> Any ideas?
> 
> I've searched the mailing-list archive.  There were a couple similar 
> posts, but I didn't see any resolutions.  Any suggestions would be 
> appreciated.
> 
> I'm using the b6 version of JDOM; I've tried b7 without any noticable 
> change.  (I'm sticking with b6 for now as I want to only change one 
> variable at a time until I've got some understanding).
> 
> Bob
> -- 
> --------------
> Bob Jacobsen (Bob_Jacobsen at lbl.gov, 510-486-7355, fax 510-495-2957)
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> 




More information about the jdom-interest mailing list