jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1350279 - /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
Date Thu, 14 Jun 2012 14:54:30 GMT
Author: stefan
Date: Thu Jun 14 14:54:30 2012
New Revision: 1350279

URL: http://svn.apache.org/viewvc?rev=1350279&view=rev
Log:
minor optimization

Modified:
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java?rev=1350279&r1=1350278&r2=1350279&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
Thu Jun 14 14:54:30 2012
@@ -272,6 +272,14 @@ public class MicroKernelImpl implements 
         }
 
         try {
+            if ("/".endsWith(path)) {
+                StoredCommit toCommit = rep.getCommit(toRevisionId);
+                if (toCommit.getParentId().equals(fromRevisionId)) {
+                    // specified range spans a single commit:
+                    // use diff stored in commit instead of building it dynamically
+                    return toCommit.getChanges();
+                }
+            }
             NodeState before = rep.getNodeState(fromRevisionId, path);
             NodeState after = rep.getNodeState(toRevisionId, path);
 



Mime
View raw message