subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1727006 - /subversion/trunk/subversion/libsvn_fs_fs/pack.c
Date Wed, 27 Jan 2016 11:45:39 GMT
Author: stefan2
Date: Wed Jan 27 11:45:39 2016
New Revision: 1727006

URL: http://svn.apache.org/viewvc?rev=1727006&view=rev
Log:
* subversion/libsvn_fs_fs/pack.c
  (sort_reps_range): Make the logic more robust against interger
                     overflows and extend the commentary.

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

Modified: subversion/trunk/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/pack.c?rev=1727006&r1=1727005&r2=1727006&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/pack.c Wed Jan 27 11:45:39 2016
@@ -896,10 +896,15 @@ sort_reps_range(pack_context_t *context,
       /* Class 1:
        * Pretty round _and_ a significant stop in the node's delta chain.
        * This may pick up more than one representation from the same chain
-       * but that's rare not a problem.  Prefer simple checks here. */
+       * but that's rare not a problem.  Prefer simple checks here.
+       *
+       * The divider of 4 is arbitrary but seems to work well in practice.
+       * Larger values increase the number of item in the "hot zone".
+       * Smaller values make delta chains at HEAD more likely to contain
+       * "cold zone" representations. */
       svn_boolean_t likely_target
         =    (round >= ffd->max_linear_deltification)
-          && (4 * round >= path_order[i]->predecessor_count);
+          && (round >= path_order[i]->predecessor_count / 4);
 
       /* Class 2:
        * Anything from short node chains.  The default of 16 is generous



Mime
View raw message