[jdom-interest] Build From a String Performance Problem?

McFarland, Todd Todd.McFarland at fmr.com
Thu Dec 14 12:06:00 PST 2000

Thanks for the reply.

Yes, the second load is very fast.  I tried to precache the builder, but it
had no affect.  It literally has to be loaded once.

Do you know of a lighter parser off hand?

I'll be using the JDOM classes in Scriplets.  Assuming I can't find a parser
is real fast on initialization, do you suggest precaching Scriplet instances
as a pool?

Thanks for the advise,
- Todd

-----Original Message-----
From: Jason Hunter [mailto:jhunter at collab.net]
Sent: Thursday, December 14, 2000 2:31 PM
To: McFarland, Todd
Cc: 'jdom-interest at jdom.org'
Subject: Re: [jdom-interest] Build From a String Performance Problem?

Probably 2.8 seconds of those 3 seconds are spend loading the Xerces
classes.  It's a very big parser designed to optimize running speed not
startup speed.  Try a second load once the JVM is "warmed" with the
Xerces classes and it's probably much faster.  But you'll also notice
JDOM lets you plug in any parser you want to the SAXBuilder constructor.


"McFarland, Todd" wrote:
> I think I'm missing something here!
> The second line of code takes about 3 seconds to execute, which makes the
> parser unusable for me.
> The microsoft parser however, is instantanious.  Can anyone comment?
> String sXML = "<TestX><Val1>some value</Val1></TestX>";
> Document doc = new org.jdom.input.SAXBuilder().build(new
> StringReader(sXML));
> Thanks,
> - Todd
> _______________________________________________
> To control your jdom-interest membership:

More information about the jdom-interest mailing list