git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] limit reused delta chains based on --depth
@ 2017-01-27 22:01 Jeff King
  2017-01-27 22:02 ` [PATCH 1/2] pack-objects: enforce --depth limit in reused deltas Jeff King
  2017-01-27 22:05 ` [PATCH 2/2] pack-objects: convert recursion to iteration in break_delta_chain() Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff King @ 2017-01-27 22:01 UTC (permalink / raw)
  To: git; +Cc: Michael Haggerty

Back when we switched pack-objects to visiting packs in
most-recently-used order last August, we realized that this could reuse
cross-pack deltas, and that the result could have longer delta chains
than any single pack contains.

I produced a patch back then[1], but we decided not to follow through
with it. Two things happened to make me revive that patch:

  1. I hit a case in the wild with a really long delta chain that caused
     pack-objects' write_one() to run out of stack space.

  2. We dropped the --aggressive depth to match the normal one. So
     there's less concern about mismatches throwing out on-disk deltas
     from a previous aggressive repack (but see the caveats in the first
     patch's commit message).

So here it is, plus another patch that converts the recursion to
iteration (the stack space needed by the function is small enough that
just the first patch was enough to fix my problem case, but it seemed
like tempting fate to leave it recursive).

  [1/2]: pack-objects: enforce --depth limit in reused deltas
  [2/2]: pack-objects: convert recursion to iteration in break_delta_chain()

 builtin/pack-objects.c      | 133 ++++++++++++++++++++++++++++++++++++--------
 pack-objects.h              |   4 ++
 t/t5316-pack-delta-depth.sh |  93 +++++++++++++++++++++++++++++++
 3 files changed, 207 insertions(+), 23 deletions(-)
 create mode 100755 t/t5316-pack-delta-depth.sh

-Peff

[1] http://public-inbox.org/git/20160811095710.p2bffympjlwmv3gc@sigill.intra.peff.net/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-28  1:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 22:01 [PATCH 0/2] limit reused delta chains based on --depth Jeff King
2017-01-27 22:02 ` [PATCH 1/2] pack-objects: enforce --depth limit in reused deltas Jeff King
2017-01-27 23:31   ` Junio C Hamano
2017-01-28  0:09     ` Jeff King
2017-01-28  0:27       ` Junio C Hamano
2017-01-27 22:05 ` [PATCH 2/2] pack-objects: convert recursion to iteration in break_delta_chain() Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).