[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Indexing revisited



Quanah Gibson-Mount wrote:
--On Friday, March 14, 2014 3:42 AM -0700 Howard Chu <hyc@symas.com> wrote:

A few thoughts occurred to me today about our indexing code:
    1) we compute a hash preset for each invocation, crunching the syntax
and matching rule's OID, among other things. (It used to be worse, we
used to recompute this for each individual value, even though it's a
constant.) There's no need to always recompute this on each invocation,
we can compute it once at first usage and reuse that result. It should
speed up index generation, particularly on smaller attribute values. I'm
preparing a patch to test this now.
    2) using this precomputed hash, we can drop the syntax, mr, and prefix
arguments from the indexer function signature. That will also speed
things up.
    3) I note that the 'use' argument is also never used in our indexer
functions. Will drop this as well.

Please send the patch my way! ;)

Complete patch is on my indx2 branch on ada. (I just copied the back-mdb changes over to back-bdb/hdb today; the back-mdb code hasn't changed from last week.)

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/