-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
performance search rate: improve attrlist_find #4309
Comments
Comment from elkris at 2020-08-31 20:50:03 Isn't a hashtable a bit overhead especially if you have entries with few attributes. |
Comment from firstyear (@Firstyear) at 2020-09-01 01:44:09
Correct. Especially if you have to rebuild the hashtable frequently too.
I think that a directly sorted version seems better here yes. Especially because attrs in a directory would tend to either single value in many cases OR a large number of values (ie memberof). So a BTreeSet would actually be perfect here as in the single value or low value case, it's effectively a sorted array. But given we don't have access to this easily in C, I think the sorted array + binary search is the best option. |
Comment from firstyear (@Firstyear) at 2020-09-01 01:44:09 Metadata Update from @Firstyear:
|
Comment from tbordaz (@tbordaz) at 2020-09-01 08:59:42 @Firstyear , @elkris, Thank you so much for your ideas and feedback. I agree that sorted array looks a better idea than hash table. A first step of the ticket is to do an evaluation of the expected benefit, will do that later today |
We are closing this ticket as the BZ was closed by the team after heavy investigation. |
This improvement is expensive and low benefit => wont fix |
Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/51256
Issue Description
The routine is highly used. Its algo is basic, following attributes list and doing strcasecmp. This ticket is to evaluate the benefit of a hashtable that would reduce the number of strcasecmp.
Package Version and Platform
all version
Steps to reproduce
searchrate on indexed attribute. Likely the more attribute in the filter and the more matching entries the more helful would be the hashtable
Actual results
Expected results
The text was updated successfully, but these errors were encountered: