On Thu, May 29, 2008 at 4:51 PM, Alex Karasulu <akarasulu@apache.org> wrote:
On Thu, May 29, 2008 at 1:49 PM, Emmanuel Lecharny <elecharny@apache.org> wrote:
Will address rest later.

3) In the DefaultSearchEngine.cursor() method, we call JdbmStore.getEntryId( base.toString() ). Here is the code of this method :

  public Long getEntryId( String dn ) throws Exception
      return ndnIdx.forwardLookup( dn );

and the JdbmIndex.forwardLookup code :

  public Long forwardLookup( K attrVal ) throws Exception
      return forward.get( getNormalized( attrVal ) );

The getNormalized() method will look into a cache for a normalized form of the DN (but as this is a general index, K can be something different from a LdapDN, of course). Anyway, if it's a DN, it's already normalized, so this is costly and useless.

Ahh so you're saying base.toString() gets the normalized DN from the base DN - ok then you're right.
We can check if the index is the ndn index and in this case, simply pass the String without checking in a cache.

Yep very true.

4) In the same DefaultSearchEngine.cursor() method, we do a lookup on the alias index :

      String aliasedBase = db.getAliasIndex().reverseLookup( baseId );

Aliases could be hold in a cache (we won't have thousands of aliases) in order to avoid a lookup. (not sure this is a great hack ...)

You cannot presume you will have few aliases.  You just never know how many people will use.  Hopefully the answer is none but this is not the case.

5) The ChangeLog, Event and Trigger interceptors should be bypassed.

Bypassed in lookup calls or search?

6) The EvaluatorBuilder uses Node attributes as String, which leads to many accesses to the OidRegistry, to check that those String are valid AttributeTypes. As the Nodes are built earlier in the process, I would suggest we store AttributeTypes instead of String into the Nodes, to avoid many lookup in the Registries.

Yeah that sounds like a great idea.  Let me know if you already fixed this in your working directory and I can back off from making the changes.

That's it for now, but enough places we can work on atm to get this branch fast !

Excellent analysis - just a few more and we can beat the trunk.