xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neeraj Bajaj <Neeraj.Ba...@sun.com>
Subject Re: Correct use of DocumentBuilderFactory & DocumentBuilder : Multithreaded application
Date Mon, 20 Sep 2004 06:54:30 GMT


Paul R Brown wrote:

>
> 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.

Size of XML must have been very small then.

Neeraj

>
> 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-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>



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


Mime
View raw message