s4-ldb: ldb indexing rewrite - part1
authorAndrew Tridgell <tridge@samba.org>
Wed, 21 Oct 2009 11:21:26 +0000 (22:21 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 22 Oct 2009 01:47:53 +0000 (12:47 +1100)
commit859cf72692f7daecbecb80559ebccc0d44087365
tree9ed75d633d6b56def03efcd1b9fc874644ca6c73
parentc5de880c409224889c30837b76fb2fdaf31c02e0
s4-ldb: ldb indexing rewrite - part1

This gets rid of the @IDXPTR approach to in-transaction indexing,
instead using an in-memory tdb to hold index values during a
transaction. This also cleans up a lot of the internal indexing logic,
hopefully making it easier to understand.

One of the big changes is in memory management, with a lot more use
made of talloc tricks to avoid copying dn lists, and shortcuts used to
avoid high intersection and union calculation costs.

The overall result is that a re-provision on my laptop goes from 48s
to a bit over 10s.
source4/lib/ldb/ldb_tdb/ldb_cache.c
source4/lib/ldb/ldb_tdb/ldb_index.c
source4/lib/ldb/ldb_tdb/ldb_tdb.c
source4/lib/ldb/ldb_tdb/ldb_tdb.h