You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/06/20 15:02:07 UTC

svn commit: r1494967 - /subversion/trunk/subversion/libsvn_fs_base/tree.c

Author: stefan2
Date: Thu Jun 20 13:02:07 2013
New Revision: 1494967

URL: http://svn.apache.org/r1494967
Log:
Attempt a similar fix to BDB as r1494913 provided for FSFS.

* subversion/libsvn_fs_base/tree.c
  (base_node_origin_rev): add efficient shortcut for the root folder

Modified:
    subversion/trunk/subversion/libsvn_fs_base/tree.c

Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1494967&r1=1494966&r2=1494967&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.c Thu Jun 20 13:02:07 2013
@@ -4811,6 +4811,13 @@ base_node_origin_rev(svn_revnum_t *revis
      prev_location() does below will work. */
   path = svn_fs__canonicalize_abspath(path, pool);
 
+  /* Special-case the root node (for performance reasons) */
+  if (strcmp(path, "/") == 0)
+    {
+      *revision = 0;
+      return SVN_NO_ERROR;
+    }
+
   /* If we have support for the node-origins table, we'll try to use
      it. */
   if (bfd->format >= SVN_FS_BASE__MIN_NODE_ORIGINS_FORMAT)