Add custom EXI buffer management 46/76546/7
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 30 Jan 2019 23:25:02 +0000 (00:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 31 Jan 2019 13:12:05 +0000 (14:12 +0100)
commit791a6a25f6670a23d390bfdeb786f70588d622a5
treeb02891767a5a9f0eeea4e948a958c8e2634321f6
parent94e254349f6f454ce1c836bbcf7035a48fe582df
Add custom EXI buffer management

Exificient's SAXDecoder by default does not free its internal buffer,
and allocates one for each decoder. With version 1.0.4 we have enough
visibility to perform buffer management.

This adds a thread-local buffer, which is reused during parse operation
and retained if it is under 64kB after the operation completes.

Change-Id: Ie2f7c72b1160d389a07c473fda6739b7eb7212cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfEXICodec.java
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/NetconfEXIToMessageDecoder.java
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ThreadLocalSAXDecoder.java [new file with mode: 0644]
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/handler/ThreadLocalSAXFactory.java [new file with mode: 0644]