fusesource / leveldbjni

A Java Native Interface to LevelDB
BSD 3-Clause "New" or "Revised" License
536 stars 143 forks source link

allow iteration without copying values #38

Open phraktle opened 11 years ago

phraktle commented 11 years ago

When iterating a range where you only need the keys (e.g. for deletion) it would be better to iterate without copying every value from the native slice (lots of garbage being created).

Currently JniDBIterator.next forces the value part to be always copied. Please provide a different mechanism that avoids this (e.g. an option for iterator or some lazy loading mechanism).

chirino commented 11 years ago

If you send in a patch or pull request we will happily review and apply.