RFR [14/java.xml] 8233686: XML transformer uses excessive amount of memory

Joe Wang huizhe.wang at oracle.com
Fri Nov 8 18:26:16 UTC 2019


Thanks for looking at the changeset.

A small change to eliminate unnecessary object allocations, that's the 
whole purpose, and what makes it worth the effort. As for the exact 
numbers (of how much it might save), it depends on users/customers' 
environment.

In terms of keeping in sync, we do that for formal releases.

Best,
Joe

On 11/8/19 4:33 AM, Bernd Eckenfels wrote:
> 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-bounces at openjdk.java.net> im Auftrag von Vyom Tiwari <vyommani at 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.wang at 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



More information about the core-libs-dev mailing list