[jdom-interest] lookup for the parser

Kesav Kumar kesavk at voquette.com
Fri Mar 23 13:03:11 PST 2001

Right now in SAXBuilder all the logic for lookup for the parser and
instantiating the correct parser is in build method.  Usually people create
SAXBuilder instance once and try to parse as many documents as they want.  I
feel we can skip this logic of looking up for parse and instantiating parser
can be skipped if we move the logic to constructor.  Right now when ever we
use build method all the logic gets executed which involves method
invcoations through reflection which is an expensive.  We can reduce all
these costs if we move the logic from build method to constructor of the
SAXBuilder.  Making the parser(XMLReader object) static would reduce the
parser lookup every time.

Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:kesavk at voquette.com
Voquette...Delivering Sound Information

More information about the jdom-interest mailing list