Bug 224995 - Make a SAX/DOM XML parser pool available for all of WTP
Summary: Make a SAX/DOM XML parser pool available for all of WTP
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: wst.xml-triaged CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2008-03-31 17:13 EDT by David Carver CLA
Modified: 2013-06-19 11:13 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2008-03-31 17:13:22 EDT
WTP 3.0M6 (All version of WTP actually)

There is a need for performance reasons to make a standard parser pool available for all WTP (or better all Eclipse) plugins to reuse.   There is substantial performance gains that can be obtained by reusing parser configurations.   Particularly during XML loading and Validation.

PDE refactored their use of XML parsers a while ago and the results can be seen in the following bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=143823

Ideally, each configuration that is needed would be added to the pull, and when parsing needs to happen, a request is made to the pool to retrieve an appropriate parser.   I think it was mentioned once that osgi has the ability to provide a xml parser as well.   I know that WTP uses some highly customized versions of Xerces, but there is no reason that these particular parsers and configurations couldn't be made available as a pool to help cut down on the overhead of instantiation and destruction of the xml parser every time it is needed.   Validation scenarios will gain the biggest benefit of this scenario, especially on works spaces that may contain several hundred large XSDs (not uncommon when working on XML Standard projects for B2B scenarios).

More information on reuse of parsers can be found here:
http://www.ibm.com/developerworks/xml/library/x-perfap2.html
http://xerces.apache.org/xerces2-j/faq-performance.html#faq-2
Comment 1 David Carver CLA 2008-03-31 17:14:19 EDT
updated severity to enhancement
Comment 2 Nitin Dahyabhai CLA 2008-04-02 22:33:00 EDT
Valentin, it sounds like this might be useful, in particular to boost validation performance?
Comment 3 David Williams CLA 2008-04-02 23:18:44 EDT
I know everyone is max'd out, but I think might even deserve some thought for our performance-M7 phase ... thought admit, not sure what it would take. I've seen what they do for some OSGI pools, and it's not much to implement (I don't think) but might be bigger change to make use of them. 
Comment 4 Valentin Baciu CLA 2008-04-02 23:40:07 EDT
The XSD EMF model also provides such a pool. See org.eclipse.xsd.util.DefaultJAXPPool. That would be useable from the layers that depend on the XSD model but now lower levels.

And yes, we are maxed out for M7, so I'll mark as helpwanted. As David says, creating the pool is one thing, changing everything to use it is another.