This does save object allocations and churn, not memory footprint I guess. The namespace mapping contains multiple stacks (with object arrays) and a hashtable and initialized records, so it seems to allocate a few kb on every node visited. (But 100MB allocation does sound like a very constructed case)
BTW the thing I wondered, is there a process to keep xerces in sync? Gruss Bernd -- http://bernd.eckenfels.net ________________________________ Von: core-libs-dev <core-libs-dev-boun...@openjdk.java.net> im Auftrag von Vyom Tiwari <vyomm...@gmail.com> Gesendet: Freitag, November 8, 2019 11:14 AM An: Joe Wang Cc: core-libs-dev Betreff: Re: RFR [14/java.xml] 8233686: XML transformer uses excessive amount of memory Hi Joe, Fix looks OK to me , but i am not able to understand how come "NamespaceMappings" instance can increase memory uses from (20MB to 140MB ). Current scope of "ns" is "case Node.ELEMENT_NODE:" block and "NamespaceMapping" seems to be very lightweight class. Thanks, Vyom On Fri, Nov 8, 2019 at 12:33 AM Joe Wang <huizhe.w...@oracle.com> wrote: > Please review a quick fix that reduces unnecessary object allocations. > > JBS: https://bugs.openjdk.java.net/browse/JDK-8233686 > webrev: http://cr.openjdk.java.net/~joehw/jdk14/8233686/webrev/ > > Thanks, > Joe > > -- Thanks, Vyom