ADDITIONAL SYSTEM INFORMATION :
A DESCRIPTION OF THE PROBLEM :
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)