#49733 Ticket 49732 - Optimize resource limit checking for rootdn issued searches
Closed by spichugi. Opened by mreynolds.
mreynolds/389-ds-base perftesting  into  master

Download 49733.patch

Description: When performing a search as the Directory Manager resource limits
should not apply. So there is no need to "get" the limits if its
a Directory Manager initiated search. I'm seeing around 2% performance
increase when we skip getting the resource limits.

https://pagure.io/389-ds-base/issue/49732

Reviewed by: ?

The fix looks good but I think it can be optimized if we test op_is_pageresults first.
Currently If it is a page result search we call twice slapi_reslimit_get_integer_limit but result only depend on li_reslimit_pagedlookthrough_handle

It can be something like
if (isroot) {
..
} else if (op_is_pageresults(op)) {
...
slapi_reslimit_get_integer_limit(li->li_reslimit_pagedlookthrough_handle)
} else {
slapi_reslimit_get_integer_limit(li->li_reslimit_lookthrough_handle)
}

Same remark as for ldbm_search we could test op_is_pageresult first to avoid a useless call to slapi_reslimit_get_integer_limit

The existing code looks like we need a limit set that can fall through as its not always set for a PS. I'll see how I can revise it...

I messed this up, and had to create a new PR:

https://pagure.io/389-ds-base/pull-request/49750

Closing this one

Pull-Request has been closed by mreynolds

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/2792

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata