Search code examples
mapdb

How to access entries stored in MapDB BTreeMap in reverse order


I want to know if there is any way by which I can access entries stored in MapDB BTreeMap in reverse order. I know I can use descendingMap() but it is very slow and it involves a lot of CPU operations. Is there any other faster way? The Key Value pairs are non primitive java types.


Solution

  • Got following reply from Jan Kotek, creator of MapDB,

    There is bug open for BTreeMap.descendingMap() iteration performance. It will be fixed in MapDB 2.