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] Updated: (DIRSERVER-1290) [Perf]Potential Speedup by returning a ref instead of a clone when asking for the RootDSE
Date Wed, 16 Jun 2010 07:44:22 GMT

     [ https://issues.apache.org/jira/browse/DIRSERVER-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny updated DIRSERVER-1290:
-----------------------------------------

    Fix Version/s: 2.0.0-RC2
                       (was: 2.0.0-RC1)

Perf issues are postponed to 2.0-RC2

> [Perf]Potential Speedup by returning a ref instead of a clone when asking for the RootDSE
> -----------------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1290
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1290
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>    Affects Versions: 1.5.4
>            Reporter: Emmanuel Lecharny
>             Fix For: 2.0.0-RC2
>
>         Attachments: rootDse.txt
>
>
> We can speedup the server if we don't clone the rootDSE when we simply need to check
for the presence of some values, like in protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
:
>          DirectoryService ds = session.getCoreSession().getDirectoryService();
>          PartitionNexus nexus = ds.getPartitionNexus();
>          Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT
).get();
>          LdapDN subschemaSubentryDn = new LdapDN( ( String ) ( subschemaSubentry.get()
) );
>          subschemaSubentryDn.normalize( ds.getRegistries().getAttributeTypeRegistry().getNormalizerMapping()
);
>          String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();
> when we call the getRootDSE method, we get back a clone, and this is done once per search.
We just need the SubschemaSubentry attribute's value here, and we won't change it.
> We could create a getRootDseRef() which returns a reference to the rootDSE object.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message