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

Re: binary entry read/write

At 12:26 PM 2001-10-19, Howard Chu wrote:
>I've just committed some patches for back-bdb that use my new encode/decode
>routines. These use around 1/10th the CPU time of the BER-based encoder. In
>a profile of adding 1205 entries to an empty database, slapd calls
>ber_memalloc  113172 times. Using the BER encoder it's 412183 times.
>Performing 4 searches for all of those entries yields 1357115 memalloc's for
>BER-based, and only 275025 for my encoder.

How much of the savings is due to caching AttributeDescriptions?

>Another aspect of this patch is to cache AttributeDescriptions. Currently my
>changes are in back-bdb/id2entry.c but I think it should be done globally
>and moved up into slapd itself. I'll look into that some more. Should
>probably move the bdb_encode/bdb_decode into slapd too, since back-bdb is
>the only thing that uses the slapd entry_encode/entry_decode routines right

Yes, this should likely be moved to slapd/entry.c so that
it could easily be reused in other backends.