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

Efficiency: update vs. replace



I'm looking for opinions and experiences dealing with updating an OpenLDAP
directory: is it faster to update a few fields, or to replace an entire
object?

Our LDAP is really a publishing framework alone.  I'm toying with two
different methods by which to manage "feeds" from the canonical source.


1) 
  + observe that some things about an object have changed
  + determine what the delta should look like 
    (includes querying the object, doing some math, etc)
  + apply the delta

2)
  + observe that somethings about an object have changed
  + generate the complete new object from scratch
  + replace the whole object


I like the second method a lot; it leaves fewer questions about "how'd this
get this way".  It seems as though it could be just a teense more efficient,
too, if you ignore the work necessary to regenerate the object, which I can.

Opinions?


- Allen S. Rout