[Date Prev][Date Next]
Re: (ITS#8124) Patch "Context for compare functions"
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8124) Patch "Context for compare functions"
- From: email@example.com
- Date: Sat, 02 May 2015 22:04:27 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
> Full_Name: James Rouzier
> Version: LMDB mdb.master
> OS: N/A
> URL: https://github.com/rouzier/openldap/commit/33f1dc8be4a8503e78930f130ff9c8e5aa9bfa7b
> Submission from: (NULL) (22.214.171.124)
> 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/