BUG-6522: intern cached QNames 51/47551/5
authorRobert Varga <rovarga@cisco.com>
Tue, 25 Oct 2016 17:37:57 +0000 (19:37 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 26 Oct 2016 11:25:32 +0000 (13:25 +0200)
commitaca106473cf5c35c3f6d514fd33f27588e75c9f2
tree82cb11de26cb233ef64615fb042f5ca2808816e7
parente6e603a9fac4c40e09d71ae7db5d0d777fdb38ff
BUG-6522: intern cached QNames

Heap analysis has shown a huge number duplicate QNameModules
being retained through QNames in this map, wasting about 4MB
of memory. Make sure we run QName.intern() before we store
them. The lookup path is still okay.

Change-Id: I389c16d4c097935dd6ff63da5623b96289a5fe0c
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/QNameToStatementDefinitionMap.java