OpenSearch/client
Armin Braun 32423a486d
Simplify and Speed up some Compression Usage (#60953) (#61008)
Use thread-local buffers and deflater and inflater instances to speed up
compressing and decompressing from in-memory bytes.
Not manually invoking `end()` on these should be safe since their off-heap memory
will eventually be reclaimed by the finalizer thread which should not be an issue for thread-locals
that are not instantiated at a high frequency.
This significantly reduces the amount of byte copying and object creation relative to the previous approach
which had to create a fresh temporary buffer (that was then resized multiple times during operations), copied
bytes out of that buffer to a freshly allocated `byte[]`, used 4k stream buffers needlessly when working with
bytes that are already in arrays (`writeTo` handles efficient writing to the compression logic now) etc.

Relates #57284 which should be helped by this change to some degree.
Also, I expect this change to speed up mapping/template updates a little as those make heavy use of these
code paths.
2020-08-12 11:06:23 +02:00
..
benchmark Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
client-benchmark-noop-api-plugin [7.x] Adding new `require_alias` option to indexing requests (#58917) (#59769) 2020-07-17 10:24:58 -04:00
rest LLRC RestClient add isRunning method (#57973) (#59345) 2020-07-14 13:35:24 -04:00
rest-high-level Simplify and Speed up some Compression Usage (#60953) (#61008) 2020-08-12 11:06:23 +02:00
sniffer Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
test Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
transport Enforce fail on deprecated gradle usage (7.x backport) (#59758) 2020-07-20 08:52:30 +02:00