libmongocrypt icon indicating copy to clipboard operation
libmongocrypt copied to clipboard

CSHARP-4944: Enable use of native crypto in libmongocrypt bindings

Open adelinowona opened this issue 1 year ago • 0 comments

Description

Use libmongocrypt native crypto when available.

What's changing

  • Bundle crypto-enabled libmongocrypt on Mac.
  • On linux continue to bundle crypto-disabled libmongocrypt, but inform users to install the crypto-enabled libmongocrypt on their system and use the new environment variable LIBMONGOCRYPT_PATH to make it available to the driver. If LIBMONGOCRYPT_PATH is not set then we default to using the packaged crypto-disabled libmongocrypt.

Performance Results

Using crypto-disabled libmongocrypt:

Method ThreadsCount Mean Error StdDev Median
BulkDecryptionUsingBinding 1 50.83 ms 0.975 ms 2.279 ms 49.70 ms
BulkDecryptionUsingBinding 2 71.34 ms 1.422 ms 3.090 ms 71.32 ms
BulkDecryptionUsingBinding 8 766.59 ms 23.535 ms 69.393 ms 776.18 ms
BulkDecryptionUsingBinding 64 5,575.51 ms 91.840 ms 85.907 ms 5,581.51 ms

Using crypto-enabled libmongocrypt:

Method ThreadsCount Mean Error StdDev
BulkDecryptionUsingBinding 1 22.03 ms 0.103 ms 0.096 ms
BulkDecryptionUsingBinding 2 22.89 ms 0.117 ms 0.104 ms
BulkDecryptionUsingBinding 8 30.69 ms 0.564 ms 0.554 ms
BulkDecryptionUsingBinding 64 201.37 ms 1.997 ms 1.559 ms

adelinowona avatar Apr 29 '24 17:04 adelinowona