Hello

I have found a new big performance reserve for those who uses Xerces 2 as a
parser, almost for free coding

Thinking why Xerces 2 takes so much time, and analyzing  CPU time I have
found that many time in xerces takes DefferedDocument...  After reading
xerces documentation I have found that this intended for those who does need
to walk over whole model.  Apache SOAP seems like is not a case - I guess it
walks over all nodes. Current XMLParserUtils  does not allow to set custom
attribute for factory, so I just hardcoded following line in function
refreshDocumentBuilderFactory.    

dbf.setAttribute("http://apache.org/xml/features/dom/defer-node-expansion";,
Boolean.FALSE);

The results - without line 105 106
With line 85, 88
The results are about 20% off full time , at least on small xmls. Maybe
additional testing is required on big requests / responses.


The solution to make it public could be add additional attribute to
refreshDocumentBuilderFactory, which could be Object[] with even number of
objects (odd - attribute name, even - value),
Map or Property and use it to set up custom properties for any factory. I
guess other parser could have some interesting features as well.
Another solution - allow to set up factory as function argument, not a class
name with param.

Another solution which is not elegant but more practical (since existing
solutions  will not need to be updated to benefit from it) make a custom
code for Apache factory setting this feature off , because it slows down
Apache SOAP.

Best regards,
Pavel

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

Reply via email to