GeezerVison is showing github.com — Improve iterator performance and add better stream support · Issue #269 · lmdbjava/lmdbjava
Improve iterator performance and add better stream support #269DescriptionI've implemented replacements for CursorIterable that appear to be faster. Raising this issue to coincide with the iterator-performance branch. Activityadded a commit that references this issue on Nov 4, 2025#269 Initial iterator performance enhancements and testing. stroomdev66 commented on Nov 4, 2025 CollaboratorAuthor More actions stroomdev66 commented on Nov 4, 2025 CollaboratorAuthor More actions My initial, and admittedly not very scientific, performance tests show the following improvements:
The X axis shows different key ranges and the Y axis is milliseconds spent executing range scans. Reacted by Cosimo Damiano Prete stroomdev66 commented on Nov 4, 2025 CollaboratorAuthor More actions Another set of tests with 100M rows
 Reacted by Cosimo Damiano Prete changed the title [-]Improve iterator performance and add better streaming support[/-] [+]Improve iterator performance and add better stream support[/+] on Nov 4, 2025added 8 commits that reference this issue on Nov 5, 2025#269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. #269 Initial iterator performance enhancements and testing. cdprete commented on Feb 20, 2026 Very nice to see the support for Stream<T> now being offered 👍
I will be able with this to drop some code from my side which was doing the same 😁 bernardladenthin commented on Jul 24, 2026 I spent some time reviewing the iterator-performance branch and opened a small follow-up PR stacked on it (targets iterator-performance, not master): #292.
It fixes a couple of things in the new iterator/stream code and adds the missing test coverage:
- Reverse prefix iteration could silently drop rows when the prefix ends in
0xFF. incrementLeastSignificantByte kept the trailing 0xFF ({0x01,0xFF} → {0x02,0xFF} instead of the tight {0x02}), so the reverse-prefix seek over-shot and iteration yielded nothing. Fixed across all four proxies, with a regression test.
LmdbStream's Spliterator advertised SORTED with a null comparator. Now reports ORDERED | NONNULL and getComparator() throws per the contract; the dead comparator stubs are removed.
KeyRange.getType() returned null for builder-created ranges (would NPE the legacy CursorIterable path) — now derives the equivalent KeyRangeType.
- Added unit/integration coverage for the buffer-proxy prefix/int-key helpers,
KeyRange builder, Dbi.newIterate/stream/getNameAsString, and the spliterator contract.
Full suite is green (excluding the pre-existing flaky TestLmdbStreamBenchmark). The bigger design calls (API naming, retiring CursorIterable, rebasing, etc.) are intentionally left for you — noted in the PR. Happy to adjust anything.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|