Skip to content

Bunch of assorted perf improvements of hot path functions#8443

Closed
alexey-tikhonov wants to merge 4 commits intoSSSD:masterfrom
alexey-tikhonov:initgr-debug
Closed

Bunch of assorted perf improvements of hot path functions#8443
alexey-tikhonov wants to merge 4 commits intoSSSD:masterfrom
alexey-tikhonov:initgr-debug

Conversation

@alexey-tikhonov
Copy link
Member

No description provided.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request appears to introduce temporary debugging statements. This type of code should be removed before merging to maintain a clean and production-ready codebase. I have left comments on each of the added debug lines with suggestions for their removal. One of the statements in sysdb_ops.c is also unreachable, which is a more critical issue.

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.
In vast majority of cases strings are ascii and lowercase.
In other cases overhead added should be negligible.
This helper is heavily used, including in hot paths.

Since number of domains used is very limited, hash table used for caching
should be very small and lookup much more efficient as compared with
`sss_tc_utf8_str_tolower()`
@alexey-tikhonov alexey-tikhonov changed the title tmp: debug Bunch of assorted perf improvements of hot path functions Feb 12, 2026
@alexey-tikhonov
Copy link
Member Author

Superseded by #8447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant