Initialize EXISchema grammars lazily 47/80047/7
authorJakub Morvay <jmorvay@frinx.io>
Wed, 30 Jan 2019 19:19:54 +0000 (20:19 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 30 Jan 2019 22:39:09 +0000 (23:39 +0100)
commit0e143235aefb80016c223f3fd8f921db21114cba
tree75cf826fd49c7151bc95bdbbc5c463d2b90c359b
parent66f2678b249fbbed0eb031f884ae0db88c6a16ed
Initialize EXISchema grammars lazily

Creating schema-backed netconf grammar is costly operation. Do not
create it until we actually need it.

This way we do not introduce any performance regression for netconf
sessions that do not want to use schema-informed grammars for EXI
encoding.

Also do not force grammar instantiation when a mismatching option
is specified by the peer.

JIRA: NETCONF-584
Change-Id: I83f5e18f423cd21c1dc993980f42e030f36a12ed
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/exi/EXIParameters.java
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/exi/EXISchema.java