[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: More about ACL performance



You really need to work with the code in HEAD. ad_inlist is optimized,
AttributeDescriptions are optimized, etc. etc... I have already found
these bottlenecks and they are gone in the HEAD stream.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Stephan Siano
> Sent: Monday, January 07, 2002 7:14 AM
> To: openldap-devel
> Subject: More about ACL performance
>
>
> Hi,
>
> during my tests with ACL caching, I found out, that the ad_inlist
> function is
> much slower than it could be. Each attrs value is first converted into a
> AttributeDescription, than the AttributeType is compared and finally the
> AttributeDescription is thrown away. The following patch just receices the
> AttributeType and compares it.
>
> Is this something for the ITS?
>
> Yours,
> Stephan Siano
>
> diff -u -r1.1.1.5 ad.c
> --- ad.c        2000/10/05 10:29:09     1.1.1.5
> +++ ad.c        2002/01/07 15:08:31
> @@ -224,19 +224,13 @@
>  {
>         int i;
>         for( i=0; attrs[i] != NULL; i++ ) {
> -               AttributeDescription *ad = NULL;
> -               const char *text;
> -               int rc;
> -
> -               rc = slap_str2ad( attrs[i], &ad, &text );
> +               AttributeType *at;
>
> -               if( rc != LDAP_SUCCESS ) continue;
> +               at = at_find(attrs[i]);
>
> -               rc = is_ad_subtype( desc, ad );
> -
> -               ad_free( ad, 1 );
> -
> -               if( rc ) return 1;
> +               if (at != NULL && is_at_subtype(desc->ad_type,at)) {
> +                       return 1;
> +               }
>         }
>
>         return 0;
>
> --
> Stephan Siano                           Mail:  Stephan.Siano@suse.de
> SuSE Linux Solutions AG                 Phone: 06196 50951 31
> Mergenthalerallee 45-47			Fax:   06196 409607
> D-65760 Eschborn
>