JDK-8233686 : XML transformer uses excessive amount of memory
  • Type: Enhancement
  • Component: xml
  • Sub-Component: javax.xml.transform
  • Affected Version: 11.0.5,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2019-10-26
  • Updated: 2020-12-10
  • Resolved: 2019-11-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.10-oracleFixed 13.0.6Fixed 14 b24Fixed
All versions

It would be nice if a fix like this patch: https://github.com/apache/xalan-j/pull/13/files can be made in upstream Java.

This allocates needlessly NamespaceMappings and it dependent HashMaps which then don't get used at all in our cases.
With the fix processing reduces memory usage from 140MB -> 20MB

I would be very happy if this is fixed in v11 too, although I'm aware that this code existed since forever :(

ps. I'm author of that PR and grant you permission to use that code as you wish (if that is even required for such a trivial change)

Fix request (13u) I'd like to port it here, too. Patch applies without any adjustment, tests tier1 and 2 pass

Fix Request (11u) This patch is simple and improves Xalan performance considerably. Patch applies cleanly to 11u, passes tier{1,2} tests.

URL: https://hg.openjdk.java.net/jdk/jdk/rev/1c071f73949a User: joehw Date: 2019-11-14 18:41:24 +0000