s4-drs: avoid calling unecesserly ldb_msg_find_attr_as_* as this call in unefficient
authorMatthieu Patou <mat@matws.net>
Mon, 14 Nov 2011 17:53:30 +0000 (18:53 +0100)
committerMatthieu Patou <mat@matws.net>
Mon, 19 Dec 2011 10:49:19 +0000 (11:49 +0100)
commit55af1a7cf78c2a04ec82dc5a3bdcaedd846dd3fc
treee87ea15c3f782315ccf25983cbaea38e4d3f1ea3
parente34fe4dcb60d2fbf7d805fc348d3a25d2d8950b7
s4-drs: avoid calling unecesserly ldb_msg_find_attr_as_* as this call in unefficient

Current implementation of ldb_msg_find_attr_as_* iterate on the list of
attributes returned by the search and make a string comparison. As we
sorting the array of messages / guids we tend to call this function many
times. By storing the GUID and the USN in a separate structure we are
sure to call this function only once per attribute and object.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/rpc_server/drsuapi/getncchanges.c