[Freeipa-devel] [PATCH] 23 Optimize and dynamically verify group membership

JR Aquino JR.Aquino at citrix.com
Thu Mar 31 21:16:57 UTC 2011


On Mar 31, 2011, at 1:48 PM, Rob Crittenden wrote:

> JR Aquino wrote:
>> The following patch Removes around 20 lines of code and provides a substantial increase in performance for FreeIPA member/memberof verification searches.
>> 
>> The current code base blindly searches static containers for the possible presence of members.
>> 
>> This patch provides a method for dynamically identifying the specific objects to verify memberships for.
>> 
>> The attached patch addresses ticket:
>> https://fedorahosted.org/freeipa/ticket/1139
>> 
>> <Without patch>
>> 
>> ipa hostgroup-find
>> 
>> ...
>> 
>> -----------------------------
>> Number of entries returned 52
>> -----------------------------
>> 
>> real	0m20.054s
>> user	0m0.934s
>> sys	0m0.050s
>> 
>> <With Patch>
>> ipa find-hostgroup
>> 
>> ...
>> 
>> -----------------------------
>> Number of entries returned 52
>> -----------------------------
>> 
>> real	0m15.064s
>> user	0m0.945s
>> sys	0m0.057s
>> 
>> 
>> ------------------------------
>> Number of entries returned 100
>> ------------------------------
>> 
>> real	0m16.471s
>> user	0m0.814s
>> sys	0m0.040s
>> 
>> <Without Patch>
>> ipa host-find
>> 
>> ...
>> 
>> ------------------------------
>> Number of entries returned 100
>> ------------------------------
>> 
>> real	0m41.277s
>> user	0m0.806s
>> sys	0m0.060s
>> 
>> <With Patch>
>> ipa host-find
>> 
>> ...
>> 
>> ------------------------------
>> Number of entries returned 100
>> ------------------------------
>> 
>> real	0m16.385s
>> user	0m0.814s
>> sys	0m0.053s
> 
> There is a typo in the first block, memeber.
> 
> Wouldn't it be clearer to do a negative test to continue:
> 
> if not 'member' in r[1]:
>    continue
> 
> rob

You're right!

Corrected patch attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jraquino-0023-Optimize-and-dynamically-verify-group-membership.patch
Type: application/octet-stream
Size: 5377 bytes
Desc: freeipa-jraquino-0023-Optimize-and-dynamically-verify-group-membership.patch
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110331/67936b5a/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110331/67936b5a/attachment.txt>


More information about the Freeipa-devel mailing list