-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Needed
Scope
- Export definition of mongocrypt_binary_t so consumers do not need to use mongocrypt_binary_data and mongocrypt_binary_len.
Motivation
Languages interfacing with libmongocrypt may observe slower throughput with frequent calls to C functions. Using the struct definition directly may improve performance for libmongocrypt operations.
DRIVERS-2581 identifies a problematic workload: decrypting documents with 1500 encrypted values.
Profiling showed mongocrypt_binary_data and mongocrypt_binary_len including significant samples.
A prototype benchmark showed improvement by using the struct definition directly, rather than calling mongocrypt_binary_data and mongocrypt_binary_len:
run_test 'Baseline' ... begin Baseline (ms): 9.868333 Decrypting (ms): 35.971542 Overhead (ms): 26.103209 Overhead (+%): 264.51487804475187 run_test 'Baseline' ... end run_test 'With Java using mongocrypt_binary_t definition' ... begin Baseline (ms): 9.756125 Decrypting (ms): 31.031459 Overhead (ms): 21.275334 Overhead (+%): 218.071560173737 run_test 'With Java using mongocrypt_binary_t definition' ... end
- is related to
-
DRIVERS-2581 Benchmark and use `mongocrypt_binary_t` definition to improve performance of In-Use Encryption
- Closed