[autobackport: sssd-2-9] SDAP: reduce logger load in the hot paths#8549
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors debug logging by converting DEBUG calls to DEBUG_CONDITIONAL across src/providers/ldap/sdap.c, src/providers/ldap/sdap_async.c, and src/providers/ldap/sdap_range.c. This change aims to improve performance by avoiding function call overhead when debugging is not active. Additionally, logging related to ldap_search_ext in sdap_async.c was consolidated. The review feedback highlights one remaining DEBUG call in sdap_async.c that should also be converted to DEBUG_CONDITIONAL for consistency and further performance optimization.
sumit-bose
left a comment
There was a problem hiding this comment.
Hi,
backport matches original version, ACK.
bye,
Sumit
This patch reduced number of *sprintf() keeping the same level of details in the resulting log. Besides, list of attrs being requested was excluded from the backtrace. Reviewed-by: Iker Pedrosa <[email protected]> Reviewed-by: Sumit Bose <[email protected]> (cherry picked from commit feca028)
Reviewed-by: Iker Pedrosa <[email protected]> Reviewed-by: Sumit Bose <[email protected]> (cherry picked from commit 87c7bce)
|
The pull request was accepted by @alexey-tikhonov with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
d75db6d to
82a4e33
Compare
This is an automatic backport of PR#8540 SDAP: reduce logger load in the hot paths to branch sssd-2-9, created by @alexey-tikhonov.
Please make sure this backport is correct.
Note
The commits were cherry-picked without conflicts.
You can push changes to this pull request
Original commits
feca028 - SDAP: reduce logger load in the hot path
87c7bce - SDAP: use DEBUG_CONDITIONAL in the hot paths
Backported commits
Original Pull Request Body
Logger usage in
sdap_get_generic_ext_step()accounts for ~2..3% in the testwhen
ignore_group_members = falseand there are 12k users in total.Other logs changes contribute ~1% in the same test.