Skip to content

v2.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 11 Apr 12:15
· 697 commits to master since this release

V2.3 represents a major code refactor/upgrade switching to using NAPI instead of NAN as the interface to Node/V8. This has two primary benefits:

  • A single binary (per platform) can be used across all (supported) versions of NodeJS, past and future.
  • Deno is adopting NAPI (denoland/deno#13633), and this will make it much easier and more efficient to support Deno (than FFI).

In addition, lmdb-js is now using a set of platform-specific sub-packages to install the appropriate binary for the platform (and only the appropriate binary). Together, this should dramatically decrease the downloaded/installed size of lmdb-js (from probably 15 MB to about 1 MB).

NAPI is a slightly slower than NAN (because it is an extra layer of abstraction). However, lmdb-js also ships binaries with extra version-specific NAN/V8 functions for performance sensitive functions. The distribution includes binary functions for Node V16 and also includes fast-api-calls, which should actually be faster than previous versions for V16 users. lmdb-js can be compiled to different Node versions if an extra boost in performance is needed.

Also note that with the transition to using NAPI as the interface for Deno support, FFI support is being dropped. That means that lmdb-js V2.3 will (probably) require Deno 1.22+, lmdb-js will need to be installed via package manager. For earlier versions of Deno, you would need to use lmdb-js V2.2.

Some other new features/improvements in V2.3:

  • Multiple versions of lmdb-js (V2.3+) can now be simultaneously installed and should properly work on the same database #136.
  • Added support for caching in combination with (abortable) child transactions #137.