Skip to content

Conversation

@stroomdev66
Copy link
Collaborator

This PR represents the most minimal changes required to migrate LmdbJava to use the new Java 25 Foreign Function and Memory API and remove Unsafe. From a user perspective there is very little API change other than the requrement to use a memory Arena in some places.

At present the performance lags behind the previous version by about 30% in many scenarios. This is down to two things:

  1. The fundamental Java FFM API appears to be a small percentage slower.
  2. The removal of Unsafe has resulted in the need for additional object creation rather than the ability to constantly reuse buffers and repoint addresses.

We are in the process of addressing some of these issues and improving some other areas of the codebase to compensate.

@stroomdev66 stroomdev66 self-assigned this Oct 24, 2025
@stroomdev66 stroomdev66 merged commit 0c82e3f into lmdbjava:java-foreign-function-and-memory-api Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant