You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/04/30 10:19:25 UTC
svn commit: r1332100 -
/directory/apacheds/branches/index-work/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
Author: elecharny
Date: Mon Apr 30 08:19:25 2012
New Revision: 1332100
URL: http://svn.apache.org/viewvc?rev=1332100&view=rev
Log:
Fetch the entry before doing an evaluation on it, for OBJECT scope searches. It saves 17%...
Modified:
directory/apacheds/branches/index-work/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
Modified: directory/apacheds/branches/index-work/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=1332100&r1=1332099&r2=1332100&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java (original)
+++ directory/apacheds/branches/index-work/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java Mon Apr 30 08:19:25 2012
@@ -162,6 +162,10 @@ public class DefaultSearchEngine<ID exte
indexEntry.setId( effectiveBaseId );
optimizer.annotate( filter );
Evaluator<? extends ExprNode, Entry, ID> evaluator = evaluatorBuilder.build( filter );
+
+ // Fetch the entry, as we have only one
+ Entry entry = db.lookup( indexEntry.getId(), effectiveBase );
+ indexEntry.setEntry( entry );
if ( evaluator.evaluate( indexEntry ) )
{