Author: stefan2
Date: Thu Jun 20 10:31:53 2013
New Revision: 1494913

URL: http://svn.apache.org/r1494913
Log:
Fix a severe performance regression in 'svn log':  The new log code
will run svn_client__repos_location_segments even if we log on the
root folder.  That triggered a long-standing performance issue in
fs_node_origin_rev.  This patch fixes the latter.

* subversion/libsvn_fs_fs/tree.c
  (fs_node_origin_rev): special case root node IDs instead of walking

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

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1494913&r1=1494912&r2=1494913&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Thu Jun 20 10:31:53 2013
@@ -3375,6 +3375,14 @@ fs_node_origin_rev(svn_revnum_t *revisio
       return SVN_NO_ERROR;
     }
 
+  /* The root node always has ID 0, created in revision 0 and will never
+     use the new-style ID format. */
+  if (strcmp(node_id, "0") == 0)
+    {
+      *revision = 0;
+      return SVN_NO_ERROR;
+    }
+
   /* OK, it's an old-style ID?  Maybe it's cached. */
   SVN_ERR(svn_fs_fs__get_node_origin(&cached_origin_id,
                                      fs,


Reply via email to