Skip to content

Commit 09426b0

Browse files
SDAP: use DEBUG_CONDITIONAL in hot path
Both `perf` and manual measurement confirms ~6..8% perf gain in the test case: - INITGROUPS lookup for a user that is a member of 5k groups, no groups were cached; - debug_level = 3 - debug_microseconds = true Note `debug_microseconds = true` - without this setting impact isn't that dramatic.
1 parent e047885 commit 09426b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/ldap/sdap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ errno_t sdap_get_primary_name(const char *attr_name,
18411841
}
18421842
talloc_free(tmp_ctx);
18431843

1844-
DEBUG(SSSDBG_TRACE_FUNC, "Processing object %s\n", orig_name);
1844+
DEBUG_CONDITIONAL(SSSDBG_TRACE_FUNC, "Processing object %s\n", orig_name);
18451845

18461846
*_primary_name = orig_name;
18471847

0 commit comments

Comments
 (0)