8176168: Performance drop due to SAXParser SymbolTable reset
Reviewed-by: joehw, lancea
This commit is contained in:
parent
a69c92afdd
commit
e5994797ab
@ -46,6 +46,10 @@ public class ParserPool {
|
|||||||
public ParserPool(int capacity) {
|
public ParserPool(int capacity) {
|
||||||
queue = new ArrayBlockingQueue<SAXParser>(capacity);
|
queue = new ArrayBlockingQueue<SAXParser>(capacity);
|
||||||
factory = SAXParserFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", SAAJUtil.getSystemClassLoader());
|
factory = SAXParserFactory.newInstance("com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", SAAJUtil.getSystemClassLoader());
|
||||||
|
try {
|
||||||
|
factory.setFeature("jdk.xml.resetSymbolTable", true);
|
||||||
|
} catch(SAXException | ParserConfigurationException e) {
|
||||||
|
}
|
||||||
factory.setNamespaceAware(true);
|
factory.setNamespaceAware(true);
|
||||||
for (int i = 0; i < capacity; i++) {
|
for (int i = 0; i < capacity; i++) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user