You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve iterator performance and add better stream support #269
changed the title [-]Improve iterator performance and add better streaming support[/-][+]Improve iterator performance and add better stream support[/+]on Nov 4, 2025
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.
Activity
#269 Initial iterator performance enhancements and testing.
stroomdev66 commentedon Nov 4, 2025
See draft PR #270
stroomdev66 commentedon Nov 4, 2025
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.
stroomdev66 commentedon Nov 4, 2025
Another set of tests with 100M rows
[-]Improve iterator performance and add better streaming support[/-][+]Improve iterator performance and add better stream support[/+]#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 commentedon 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 😁
Add tests for iterator/stream helpers; fix LmdbStream SORTED contract
bernardladenthin commentedon Jul 24, 2026
I spent some time reviewing the
iterator-performancebranch and opened a small follow-up PR stacked on it (targetsiterator-performance, notmaster): #292.It fixes a couple of things in the new iterator/stream code and adds the missing test coverage:
0xFF.incrementLeastSignificantBytekept the trailing0xFF({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 advertisedSORTEDwith anullcomparator. Now reportsORDERED | NONNULLandgetComparator()throws per the contract; the dead comparator stubs are removed.KeyRange.getType()returnednullfor builder-created ranges (would NPE the legacyCursorIterablepath) — now derives the equivalentKeyRangeType.KeyRangebuilder,Dbi.newIterate/stream/getNameAsString, and the spliterator contract.Full suite is green (excluding the pre-existing flaky
TestLmdbStreamBenchmark). The bigger design calls (API naming, retiringCursorIterable, rebasing, etc.) are intentionally left for you — noted in the PR. Happy to adjust anything.