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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




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



Reply via email to