-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 17, 18, 19
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8321600 | 17.0.11 | Sonia Zaldana Calles | P4 | Resolved | Fixed | b01 |
Profiling of SPECjvm2008:xml.validation shows there are lots of InvalidateDataTypeValueExceptions are thrown from Xerces. See screenshot for async-profiler stack trace.
It does not look like those exceptions leak outside javax.xml. The uses of exception or its subclasses (`InvalidDatatypeValueException`, `InvalidDatatypeFacetException`) take the form of:
```
catch (InvalidDatatypeValueException ex) {
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
ex.getKey(),
ex.getArgs(),
XMLErrorReporter.SEVERITY_ERROR );
}
```
...so they don't seem to use the stack traces: only key, args, message is used. Which means we can turn `DatatypeException` stackless, and save some cycles on throws.
This improves xml.validation performance for about +3%.
It does not look like those exceptions leak outside javax.xml. The uses of exception or its subclasses (`InvalidDatatypeValueException`, `InvalidDatatypeFacetException`) take the form of:
```
catch (InvalidDatatypeValueException ex) {
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
ex.getKey(),
ex.getArgs(),
XMLErrorReporter.SEVERITY_ERROR );
}
```
...so they don't seem to use the stack traces: only key, args, message is used. Which means we can turn `DatatypeException` stackless, and save some cycles on throws.
This improves xml.validation performance for about +3%.
- backported by
-
JDK-8321600 Make Xerces DatatypeException stackless
-
- Resolved
-