Do not format QNames to string on input
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 28 May 2019 11:14:34 +0000 (13:14 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 29 May 2019 16:31:53 +0000 (16:31 +0000)
commit6489441d9bfc192c86400ee4dbece1a3e992b963
treea3a61f12b2eebad8d8aad4db11224aead25a3e3b
parent827c55ed92a69d55a70a2666d63b7c3f9cc6a6b8
Do not format QNames to string on input

Profiling has revelead the creation of String for QNameFactory
lookup is taking around 19% of overall cost of
NormalizedNodeInputStreamReader.readQName().

Rather than using concatenation, use a dedicated Key object, which
holds the separated-out localname/namespace/revision strings,
thus allocating a small object instead of a full-blown String.

This improves snapshot deserialization perfomance on a 350MiB
snapshot by about 16%, also resulting in lower memory pressure.

JIRA: CONTROLLER-1897
Change-Id: If3e9e4b332b0a5acbe33aa10fca189bbc7da8c81
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
node/utils/QNameFactoryTest.java