ldb-modules: avoid reallocating the attributes array if we don't have ranged attribut... ldb_perfs
authorMatthieu Patou <mat@matws.net>
Mon, 25 May 2015 16:21:58 +0000 (09:21 -0700)
committerMatthieu Patou <mat@matws.net>
Wed, 27 May 2015 05:01:40 +0000 (22:01 -0700)
commit1adcbf34b6f359ba137969d21e39be43b046627d
treef4fb519a517aeb1071a409eac923cd1f7ce7ab53
parent1ee0532b09210d05d2b6e4c1dec992d3dad0391f
ldb-modules: avoid reallocating the attributes array if we don't have ranged attributes in the request

Instead of reallocating the array every time, just do it when needed.
It's accounting for 3% of runtime on dbcheck (talloc alone, there is
some other gains due to the lack of talloc_free to do).

Change-Id: I6f44d3582c9b496f78c0b0a42d61bf54dd4cbdbe
Signed-off-by: Matthieu Patou <mat@matws.net>
source4/dsdb/samdb/ldb_modules/ranged_results.c