directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-652) Avoid multiple creation of LdapDN
Date Sat, 24 Jun 2006 16:13:30 GMT
    [ http://issues.apache.org/jira/browse/DIRSERVER-652?page=comments#action_12417641 ] 

Emmanuel Lecharny commented on DIRSERVER-652:
---------------------------------------------

I evaluate the gain in performance for search operations to 3,7%. (tests done with a server
containing 10000 entries and doing a random search)

> Avoid multiple creation of LdapDN
> ---------------------------------
>
>          Key: DIRSERVER-652
>          URL: http://issues.apache.org/jira/browse/DIRSERVER-652
>      Project: Directory ApacheDS
>         Type: Improvement

>     Versions: 1.0-RC3
>     Reporter: Emmanuel Lecharny
>      Fix For: 1.0-RC4

>
> After having profiled the server, I found that the LdapDN<init>(Name) has been
called 3000 times, because the LdapPrincipal contains a Name instead of a LdapDN element.

> We should check that the passed Name is not an instance of LdapDN before calling new
LdapDN( Name) in 
> org.apache.directory.server.core.authz.DefaultAuthorizationService.protectLookUp() method
>  :
> ...
> LdapDN principalDn = new LdapDN( ( ( ServerContext ) ctx ).getPrincipal().getJndiName()
);
> ...
> could be :
> Name name = ( ( ServerContext ) ctx ).getPrincipal().getJndiName() ;
> LdapDN principalDn= ( name instanceof LdapDN ? name.clone() : new LdapDN( name ) );
>     

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message