Full_Name: James Rouzier
Version: LMDB mdb.master
Submission from: (NULL) (188.8.131.52)
New feature inclusion request: "Context for compare functions"
I am finishing up a new perl module which is a very thin wrapper for LMDB.
(The current perl LMDB module does not fit my needs as it does not support
NO_TLS really support).
When looking at mdb_set_compare and mdb_set_dupsort.
There were three choices.
* Not support mdb_set_compare, mdb_set_dupsort in the module.
* Capture each mdb_*(del|put|get) function to figure which dbi I am using.
* Add support for contexts in the compare functions.
So I decided on the latter.
I understand that passing a context for each compare can add some overhead.
So I made this feature optional it is only enabled if the macro MDB_CMP_CTX is
I don't see supporting compare functions in interpreted languages being
a realistic/worthwhile thing to do. The difference in performance is
orders of magnitude.
I also don't believe such conditional compilation is a good idea. LMDB
is designed to be simple, to have very few options, and to Just Work the
same on every platform. Conditionally compiled features are horrible
because you can't guess which features will be present in a
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/