xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul R Brown <...@fivesight.com>
Subject Re: Correct use of DocumentBuilderFactory & DocumentBuilder : Multithreaded application
Date Tue, 14 Sep 2004 03:31:16 GMT

Hi, Vikrant --

 From the description of your application, it sounds like you would 
benefit from a custom configuration.  As for your other question:

> Is it absolutely required to create an instances of
> "DocumentBuilderFactory and DocumentBuilder" for each
> request? [as it is performance hit]

It is absolutely NOT necessary.  The last time I profiled things out, 
the ratio between cost is something like 300:100:1 for 
DocumentBuilderFactory:DocumentBuilder:Document, i.e., creating a 
DocumentBuilderFactory is 300 times as expensive (in time) as creating 
a Document.

Your best bet is to set up some rudimentary pooling (e.g., using 
Commons Pool) and work from there.

Others can probably comment on how to configure individiual Xerces 
instances for best performance based on your scenario.

	-- Paul

To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

View raw message