You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/09/27 12:10:24 UTC

svn commit: r1001655 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: philip
Date: Mon Sep 27 10:10:24 2010
New Revision: 1001655

URL: http://svn.apache.org/viewvc?rev=1001655&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
  (copy_working_from_base): Note the O(N^2) behaviour and probable fix.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1001655&r1=1001654&r2=1001655&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Mon Sep 27 10:10:24 2010
@@ -976,7 +976,13 @@ copy_working_from_base(void *baton,
 
   /* Need to update the op_depth of all deleted children. A single
      query can locate all the rows, but not update them, so we fall
-     back on one update per row. */
+     back on one update per row.
+
+     ### Rewriting the op_depth means that the number of queries is
+     ### O(depth^2).  Fix it by implementing svn_wc__db_op_delete so
+     ### that the recursion gets moved from adm_ops.c to wc_db.c and
+     ### one transaction does the whole tree and thus each op_depth
+     ### only gets written once. */
   like_arg = construct_like_arg(piwb->local_relpath, scratch_pool);
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                     STMT_SELECT_CHILDREN_OP_DEPTH_RECURSIVE));