I was profiling some code recently and found that the Xerces2's JAXP
DocumentBuilderFactory setAttribute() method is very slow on my
machine (Athlon XP 2500+, 1GB RAM).  It takes approximately 50ms (!)
to call setAttribute(), which I do about five times when setting up my
DocumentBuilderFactory.  I realize that in terms of long-running
applications this overhead is negligible, but in the case of
short-lived applications (of which I intend to do), it is quite
noticeable.

I glanced through
org/apache/xerces/jaxp/DocumentBuilderFactoryImpl.java and it looks
like the culprit is the manner in which features/properties are
checked for correctness: an instance of DOMParser is created and the
feature/property is passed to it.  This wouldn't be a bad thing if the
cost of creating a DOMParser wasn't, relatively speaking, so
expensive.

I'm throwing this issue out on the user mailing list because I'm not
sure if it would be appropriate to mention it on the developer list. 
At any rate, is anyone aware of this issue?  Is anything being done to
address it?  If not, would I be able to submit my own patch for the
problem?


Thanks,


Curtiss Howard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to