]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/pack-delta-reuse-with-bitmap'
authorJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2018 20:53:53 +0000 (13:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2018 20:53:53 +0000 (13:53 -0700)
When creating a thin pack, which allows objects to be made into a
delta against another object that is not in the resulting pack but
is known to be present on the receiving end, the code learned to
take advantage of the reachability bitmap; this allows the server
to send a delta against a base beyond the "boundary" commit.

* jk/pack-delta-reuse-with-bitmap:
  pack-objects: reuse on-disk deltas for thin "have" objects
  pack-bitmap: save "have" bitmap from walk
  t/perf: add perf tests for fetches from a bitmapped server
  t/perf: add infrastructure for measuring sizes
  t/perf: factor out percent calculations
  t/perf: factor boilerplate out of test_perf

1  2 
builtin/pack-objects.c
pack-bitmap.c
pack-objects.c
pack-objects.h

Simple merge
diff --cc pack-bitmap.c
Simple merge
diff --cc pack-objects.c
Simple merge
diff --cc pack-objects.h
index 62806ccc39ea31b425089f4f38121d81a02fe5dd,3fd10b15c95c6c04c12671674f9f609b341c8cc5..b0c1f137c675519cd527be2bc4a058e71024562c
@@@ -111,7 -109,9 +111,8 @@@ struct object_entry 
        unsigned tagged:1; /* near the very tip of refs */
        unsigned filled:1; /* assigned write-order */
        unsigned dfs_state:OE_DFS_STATE_BITS;
 -      unsigned char in_pack_header_size;
        unsigned depth:OE_DEPTH_BITS;
+       unsigned ext_base:1; /* delta_idx points outside packlist */
  
        /*
         * pahole results on 64-bit linux (gcc and clang)
@@@ -143,12 -142,15 +144,20 @@@ struct packing_data 
        struct packed_git **in_pack_by_idx;
        struct packed_git **in_pack;
  
 +#ifndef NO_PTHREADS
 +      pthread_mutex_t lock;
 +#endif
 +
+       /*
+        * This list contains entries for bases which we know the other side
+        * has (e.g., via reachability bitmaps), but which aren't in our
+        * "objects" list.
+        */
+       struct object_entry *ext_bases;
+       uint32_t nr_ext, alloc_ext;
        uintmax_t oe_size_limit;
 +      uintmax_t oe_delta_size_limit;
  };
  
  void prepare_packing_data(struct packing_data *pdata);