You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/05/23 03:45:52 UTC

svn commit: r1341718 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/prop_commands.c libsvn_wc/props.c libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c libsvn_wc/wc_db.h tests/libsvn_wc/wc-queries-test.c

Author: rhuijben
Date: Wed May 23 01:45:51 2012
New Revision: 1341718

URL: http://svn.apache.org/viewvc?rev=1341718&view=rev
Log:
To remove another slow query, remove a dead code path: streamily retrieving
the op_depth 0 properties.

* subversion/include/private/svn_wc_private.h
  (svn_wc__prop_list_recursive): Remove argument.

* subversion/libsvn_client/prop_commands.c
  (get_prop_from_wc,
   svn_client_proplist3): Update caller.

* subversion/libsvn_wc/props.c
  (svn_wc__prop_list_recursive): Remove argument. Update caller.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_CACHE_NODE_BASE_PROPS): Remove unused query.

* subversion/libsvn_wc/wc_db.c
  (cache_props_baton_t): Remove variable.
  (cache_props_recursive): Remove dead code path.
  (svn_wc__db_read_props_streamily): Remove argument.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_read_props_streamily): Remove argument.

* subversion/tests/libsvn_wc/wc-queries-test.c
  (slow_statements): Remove query.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/prop_commands.c
    subversion/trunk/subversion/libsvn_wc/props.c
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed May 23 01:45:51 2012
@@ -888,10 +888,6 @@ typedef svn_error_t *(*svn_wc__proplist_
  * If @a propname is not NULL, the passed hash table will only contain
  * the property @a propname.
  *
- * If @a base_props is @c TRUE, get the unmodified BASE properties
- * from the working copy, instead of getting the current (or "WORKING")
- * properties.
- *
  * If @a pristine is not @c TRUE, and @a base_props is FALSE show local
  * modifications to the properties.
  *
@@ -912,7 +908,6 @@ svn_wc__prop_list_recursive(svn_wc_conte
                             const char *local_abspath,
                             const char *propname,
                             svn_depth_t depth,
-                            svn_boolean_t base_props,
                             svn_boolean_t pristine,
                             const apr_array_header_t *changelists,
                             svn_wc__proplist_receiver_t receiver_func,

Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Wed May 23 01:45:51 2012
@@ -769,7 +769,7 @@ get_prop_from_wc(apr_hash_t *props,
   rb.wc_ctx = ctx->wc_ctx;
 
   SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, target_abspath,
-                                      propname, depth, FALSE, pristine,
+                                      propname, depth, pristine,
                                       changelists,
                                       recursive_propget_receiver, &rb,
                                       ctx->cancel_func, ctx->cancel_baton,
@@ -1148,8 +1148,7 @@ svn_client_proplist3(const char *path_or
             }
 
           SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath, NULL,
-                                              depth,
-                                              FALSE, pristine, changelists,
+                                              depth, pristine, changelists,
                                               recursive_proplist_receiver, &rb,
                                               ctx->cancel_func,
                                               ctx->cancel_baton, pool));

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Wed May 23 01:45:51 2012
@@ -1842,7 +1842,6 @@ svn_wc__prop_list_recursive(svn_wc_conte
                             const char *local_abspath,
                             const char *propname,
                             svn_depth_t depth,
-                            svn_boolean_t base_props,
                             svn_boolean_t pristine,
                             const apr_array_header_t *changelists,
                             svn_wc__proplist_receiver_t receiver_func,
@@ -1896,7 +1895,7 @@ svn_wc__prop_list_recursive(svn_wc_conte
     case svn_depth_infinity:
       {
         SVN_ERR(svn_wc__db_read_props_streamily(wc_ctx->db, local_abspath,
-                                                depth, base_props, pristine,
+                                                depth, pristine,
                                                 changelists, receiver, baton,
                                                 cancel_func, cancel_baton,
                                                 scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Wed May 23 01:45:51 2012
@@ -1109,13 +1109,6 @@ UPDATE temp__node_props_cache 
                    AND a.local_relpath = temp__node_props_cache.local_relpath),
                properties)
 
--- STMT_CACHE_NODE_BASE_PROPS
-INSERT INTO temp__node_props_cache (local_relpath, kind, properties)
-  SELECT local_relpath, kind, properties FROM nodes_base
-  WHERE wc_id = ?1
-    AND local_relpath IN (SELECT local_relpath FROM targets_list)
-    AND presence IN ('normal', 'incomplete')
-
 -- STMT_CACHE_NODE_PRISTINE_PROPS
 INSERT INTO temp__node_props_cache(local_relpath, kind, properties)
  SELECT local_relpath, kind, 

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed May 23 01:45:51 2012
@@ -8208,7 +8208,6 @@ svn_wc__db_read_url(const char **url,
 typedef struct cache_props_baton_t
 {
   svn_depth_t depth;
-  svn_boolean_t base_props;
   svn_boolean_t pristine;
   const apr_array_header_t *changelists;
   svn_cancel_func_t cancel_func;
@@ -8232,9 +8231,7 @@ cache_props_recursive(void *cb_baton,
   SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
                                       STMT_CREATE_NODE_PROPS_CACHE));
 
-  if (baton->base_props)
-    stmt_idx = STMT_CACHE_NODE_BASE_PROPS;
-  else if (baton->pristine)
+  if (baton->pristine)
     stmt_idx = STMT_CACHE_NODE_PRISTINE_PROPS;
   else
     stmt_idx = STMT_CACHE_NODE_PROPS;
@@ -8244,7 +8241,7 @@ cache_props_recursive(void *cb_baton,
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   /* ACTUAL props aren't relevant in the pristine case. */
-  if (baton->base_props || baton->pristine)
+  if (baton->pristine)
     return SVN_NO_ERROR;
 
   if (baton->cancel_func)
@@ -8263,7 +8260,6 @@ svn_error_t *
 svn_wc__db_read_props_streamily(svn_wc__db_t *db,
                                 const char *local_abspath,
                                 svn_depth_t depth,
-                                svn_boolean_t base_props,
                                 svn_boolean_t pristine,
                                 const apr_array_header_t *changelists,
                                 svn_wc__proplist_receiver_t receiver_func,
@@ -8292,7 +8288,6 @@ svn_wc__db_read_props_streamily(svn_wc__
   VERIFY_USABLE_WCROOT(wcroot);
 
   baton.depth = depth;
-  baton.base_props = base_props;
   baton.pristine = pristine;
   baton.changelists = changelists;
   baton.cancel_func = cancel_func;

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Wed May 23 01:45:51 2012
@@ -2022,9 +2022,6 @@ svn_wc__db_read_props(apr_hash_t **props
  * a hash table mapping <tt>char *</tt> names onto svn_string_t *
  * values for any properties of child nodes of LOCAL_ABSPATH (up to DEPTH).
  *
- * If BASE_PROPS is TRUE, read the properties from the BASE layer (op_depth=0),
- * without local modifications.
- *
  * If BASE_PROPS is FALSE, read the properties from the WORKING layer (highest
  * op_depth).
  *
@@ -2035,7 +2032,6 @@ svn_error_t *
 svn_wc__db_read_props_streamily(svn_wc__db_t *db,
                                 const char *local_abspath,
                                 svn_depth_t depth,
-                                svn_boolean_t base_props,
                                 svn_boolean_t pristine,
                                 const apr_array_header_t *changelists,
                                 svn_wc__proplist_receiver_t receiver_func,

Modified: subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1341718&r1=1341717&r2=1341718&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c Wed May 23 01:45:51 2012
@@ -107,7 +107,6 @@ static const int slow_statements[] =
   /* Join on targets table */
   STMT_CACHE_NODE_PROPS,
   STMT_CACHE_ACTUAL_PROPS,
-  STMT_CACHE_NODE_BASE_PROPS,
   STMT_CACHE_NODE_PRISTINE_PROPS,
   STMT_SELECT_RELEVANT_PROPS_FROM_CACHE,
   STMT_UPDATE_ACTUAL_CHANGELISTS,