Skip to content

Releases: CoreyKaylor/Lightning.NET

More Performance Improvements w/Span & Cursor redesign.

30 Jul 22:33

Choose a tag to compare

Performance Related Improvements

You can see the benchmarks here #125

  • MDBValue becomes more prominent in the API instead of an internal detail.
    • Exposes an AsSpan and a CopyToNewArray function.
    • AsSpan with a buffer pool can avoid any memory duplication and provides a 0-copy read
    • This is obviously a breaking change, but the changes to your application should be pretty straightforward
  • MDBResultCode is now returned on all signatures where the native counterpart returns a code
    • BREAKING!!! In your code this means that if you were previously relying on LightningException for control flow, your code will now need to adapt. I think in practice this has made the API easier to work with, but every situation might be different. There are now a set of extension methods ThrowOnError and ThrowOnReadError that provide the same behavior if you need it, but now you'll have to be explicit about it.

Cursor API redesign

  • LightningCursor previously took on a .NET api-centric role and there was some lossy translation due to this, in some cases some race conditions that would result in corrupted usage.
    • Now API is much closer to the native lib counterpart
    • There is now an AsEnumerable extension method as an alternative to the cursor itself being enumerable.
    • You can track the method name changes here 3528a88

Less notable changes

Some improvements were made to rework some of the tests and add some test coverage that was previously lacking. More can be done, but this is a good step forward.

We'll try to be a little more sensitive to breaking changes going forward and hopefully we're through the bulk of them.

Performance improvements w/Span API

06 Jul 22:14

Choose a tag to compare

Highlights

@AlgorithmsAreCool Added benchmarks for better visibility on performance #119
@AlgorithmsAreCool Introduced Span for much better native interop performance #122
Uses Github Actions and covers more OS variations
Updated native lmdb libs to 0.9.24

Upgrade instructions for those coming from pre-span changes.

MDBValue now makes itself more prominent in the public API. It exposes two new methods CopyToNewArray, and AsSpan. If you simply want older code to work and compile again, CopyToNewArray is what you're looking for. If you want to squeeze more performance, spend some time with AsSpan.

0.8.14

31 May 02:08

Choose a tag to compare

  • lmdb updated from master
  • Fixed CompareFunction being collected by GC

0.8.12

31 Jan 04:37

Choose a tag to compare

  • Implemented mdb_set_compare and mdb_set_dupsort
  • Implemented cursor operations: multiple put, get multiple, move next multiple
  • DatabaseOpenFlags.DuplicatesFixed now include DuplicatesSort by default
  • MoveNextDuplicate and MovePrevDuplicate now return only value
  • Actualised CursorPutOptions and PutOptions
  • Added missing to-bytes converters
  • API improvements and changes

0.8.8.52157

18 Jan 08:58

Choose a tag to compare

  • Added missing PutOptions
  • Added compact option to LightningEnvironment.CopyTo

0.8.7.52133

18 Jan 08:35

Choose a tag to compare

  • Fixed concurrency issues with CursorManager & TransactionManager
  • Added missing environment open flags
  • Fixed LightningEnvironment.UsedSize calculation logic

0.8.6.51452

28 Dec 01:54

Choose a tag to compare

  • Added LightningTransaction.GetEntriesCount
  • Added LightningEnvironment.PageSize, LightningEnvironment.UsedSize, LightningEnvironment.EntriesCount
  • Fixed incorrect default map size value

0.8.5.51145

25 Dec 22:51

Choose a tag to compare

  • LMDB updated from master (ver. 0.9.15)
  • Internal resources management refactoring
  • Minor bug fixes

0.8.3.52343

04 Jun 19:51

Choose a tag to compare

Updated lmdb vesion

0.8.2.51054

09 May 07:00

Choose a tag to compare

Added docs and enchanced API