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 2013/12/23 13:20:44 UTC

svn commit: r1553101 - /subversion/trunk/subversion/libsvn_client/log.c

Author: rhuijben
Date: Mon Dec 23 12:20:44 2013
New Revision: 1553101

URL: http://svn.apache.org/r1553101
Log:
Avoid performance regression in 'svn log' vs 1.7 when only passing a single
revision range. This regression was even bigger when running against a pre
1.5 server that doesn't implement svn_ra_get_location_segments().

In this case we run log against the youngest revision, which we already
resolved when opening the ra session.

* subversion/libsvn_client/log.c
  (svn_client_log6): Also apply the repository root optimization when we only
    have a single revision range as in this case we already resolved the path.

Modified:
    subversion/trunk/subversion/libsvn_client/log.c

Modified: subversion/trunk/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/log.c?rev=1553101&r1=1553100&r2=1553101&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/log.c (original)
+++ subversion/trunk/subversion/libsvn_client/log.c Mon Dec 23 12:20:44 2013
@@ -902,10 +902,11 @@ svn_client_log6(const apr_array_header_t
                                             actual_loc->url, pool));
 
   /* Save us an RA layer round trip if we are on the repository root and
-     know the result in advance.  All the revision data has already been
-     validated.
+     know the result in advance, or if we don't need multiple ranges.
+     All the revision data has already been validated.
    */
-  if (strcmp(actual_loc->url, actual_loc->repos_root_url) == 0)
+  if (strcmp(actual_loc->url, actual_loc->repos_root_url) == 0
+      || opt_rev_ranges->nelts <= 1)
     {
       svn_location_segment_t *segment = apr_pcalloc(pool, sizeof(*segment));
       log_segments = apr_array_make(pool, 1, sizeof(segment));
@@ -927,7 +928,6 @@ svn_client_log6(const apr_array_header_t
                                                   ctx, pool));
     }
 
-
   SVN_ERR(run_ra_get_log(revision_ranges, relative_targets, log_segments,
                          actual_loc, ra_session, targets, limit,
                          discover_changed_paths, strict_node_history,