rocksdb/java
Alan Paxton f8969ad7d4 Improve Java API get() performance by reducing copies (#10970)
Summary:
Performance improvements for `get()` paths in the RocksJava API (JNI).
Document describing the performance results.

Replace uses of the legacy `DB::Get()` method wrapper returning data in a `std::string` with direct calls to `DB::Get()` passing a pinnable slice to receive this data. Copying from a pinned slice direct to the destination java byte array, without going via an intervening std::string, is a major performance gain for this code path.

Note that this gain only comes where `DB::Get()` is able to return a pinned buffer; where it has to copy into the buffer owned by the slice, there is still the intervening copy and no performance gain. It may be possible to address this case too, but it is not trivial.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10970

Reviewed By: pdillinger

Differential Revision: D42125567

Pulled By: ajkr

fbshipit-source-id: b7a4df7523b0420cadb1e9b6c7da3ec030a8da34
2022-12-21 11:54:24 -08:00
..
benchmark/src/main/java/org/rocksdb/benchmark jni: expose memtable_whole_key_filtering option (#9394) 2022-02-04 16:01:16 -08:00
crossbuild Support C++17 Docker build environments for RocksJava (#9500) 2022-02-17 12:48:38 -08:00
jmh Improve Java API get() performance by reducing copies (#10970) 2022-12-21 11:54:24 -08:00
rocksjni Improve Java API get() performance by reducing copies (#10970) 2022-12-21 11:54:24 -08:00
samples/src/main/java Java build: finish compiling before testing (etc) (#10034) 2022-05-23 09:56:40 -07:00
src JNI native memory leak - release array elements (#10981) 2022-12-14 10:49:32 -08:00
CMakeLists.txt Support prepopulating/warming the blob cache (#10298) 2022-07-17 07:13:59 -07:00
GetBenchmarks.md Improve Java API get() performance by reducing copies (#10970) 2022-12-21 11:54:24 -08:00
HISTORY-JAVA.md Update JAVA-HISTORY.md for v3.13 2015-08-04 18:12:58 -07:00
Makefile RocksJava API - fix Transaction.multiGet() size limit, remove bogus EnsureLocalCapacity() calls (#10674) 2022-10-26 17:25:33 -07:00
RELEASE.md Add shared library for musl-libc (#3143) 2019-11-26 18:24:09 -08:00
jdb_bench.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
pom.xml.template Improve Java API get() performance by reducing copies (#10970) 2022-12-21 11:54:24 -08:00
understanding_options.md New-style blob option bindings, Java option getter and improve/fix option parsing (#8999) 2021-10-19 09:21:52 -07:00