Rename SodiumNormalizedNode* classes These are implementing Neon SR2 serialization format, hence they should be named as such. Change-Id: Iaa509e3490b420b8005a2724105bf99b53d95cf2 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Rename SODIUM versions to NEON_SR2 We are shipping these improvements in Neon SR2, which means we should reserve this version not as Sodium. Change-Id: If5caa0dd7510c6e1ffe3c483c74c456798ca6bb3 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Switch default output stream version All versioned callers have been converted to use appropriate stream versions, this patch bumps the default unversioned stream to Sodium version. Since we're changing the serialization format for ExecuteRpc, make sure we fully embrace writer/reader, so that we get better instantiation. JIRA: CONTROLLER-1888 Change-Id: I17deeda1a49394600a5b0f93bd46d3b2c812123c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Add QNameModule coding Coding on QNames is effective when there are a lot of same QNames, but there are cases where QNames themeselves are not reused -- for example YangInstanceIdentifiers and small read subtrees. These typically end up using different QNames from a small set of modules, hence coding modules actually helps them quite a bit. This patch adds a namespace/revision cache, so that encoding such QNames is also efficient. JIRA: CONTROLLER-1898 Change-Id: I6cd0885ef605e4a1bf7b768ffe215e9eb3e2fbc5 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Optimize NodeIdentifier reading NodeIdentifiers are just an alias for QName, which is heavily reused. This patch adds a secondary cache for interpreting QNames as NodeIdentifiers, with instance reuse. This allows us to reduce the number of NodeIdentifier instances, while not relying on NodeIdentifier.create() for the common lookup case. JIRA: CONTROLLER-1898 Change-Id: Ifa0c5d572f7d39da49707529c7ddd9c9f36f2dab Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Add support for coded QNames/AugmentationIdentifiers Profiling is showing we are spending about 46% in readQName(), which further breaks down to 30% in readCodedString() and 61% in QNameFactory.create(). Out of 1.7M invocations of readQName(), we end up loading only 508 QNames -- which is understandable, as the number of QNames is bound by the SchemaContext contents. This also applies to AugmentationIdentifiers. This patch defines a new streaming format version, which uses the same linear coding approach we take for Strings, taking hash-based lookups out of the hot path -- bringing reconstruction time down from 36 to 19-24 seconds. It has also the effect of reducing the snapshot size, in our testing bringing a 388.8MiB snapshot down to 210.6MiB. JIRA: CONTROLLER-1898 Change-Id: Ibbc96c286d52b3261b04dd7de02e13bc6b44e803 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>