git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: git@vger.kernel.org
Cc: "Craig Schlenter" <craig@codefountain.com>,
	"Petr Baudis" <pasky@suse.cz>
Subject: Re: Balanced packing strategy
Date: Mon, 14 Nov 2005 11:24:35 +0100	[thread overview]
Message-ID: <200511141124.35429.Josef.Weidendorfer@gmx.de> (raw)
In-Reply-To: <W4340426396265721131944586@webmail12>

On Monday 14 November 2005 06:03, Craig Schlenter wrote:
> Hi
> 
> > From: Josef Weidendorfer [mailto:Josef.Weidendorfer@gmx.de]
> > [snip]
> > AFAICS, the git native protocol (which is nothing more than a pack itself
> > for each transfer) even has this problem, too: If you are updating every
> > day via git native, the sum of transfered bytes in a month will be a
> > multiple of one git transfer for all the month's changes.
> 
> Interesting ... is this because in a bigger pack the compression will
> be better as there is probably more stuff to "delta" against?

No, it is because of the self-containment of git packs: Deltas (storing
differences instead of full file content) are only allowed to other
objects in the same pack. The self-containment is a safety measure: you
do not want to have dependencies to the outside, because this would
destroy the contents of a pack by changing/removing another file.

So if the changes of a day are 100 oneliners to different files, the pack
has to contain the full content of the 100 files. With incremental
packing, you would probably add only the 100 oneliners (ie. deltas) at end
of the pack, because the full file contents have to be in the pack if there
was a change to them recorded in the pack previously. And this probability
is higher if the pack contains a larger history of the project.

Back to the example: By doing a git transfer every day, you always will
transfer the full contents of files which where changed on this day, because
git protocol transfers self-contained packs.

Josef

  reply	other threads:[~2005-11-14 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-14  5:03 Balanced packing strategy Craig Schlenter
2005-11-14 10:24 ` Josef Weidendorfer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-12 13:04 Remove unneeded packs Marcel Holtmann
2005-11-12 13:40 ` Craig Schlenter
2005-11-12 13:59   ` Balanced packing strategy Petr Baudis
2005-11-12 15:14     ` Craig Schlenter
2005-11-13  2:34       ` Junio C Hamano
2005-11-13 11:00         ` Petr Baudis
2005-11-13 20:06     ` Josef Weidendorfer
2005-11-13 23:13       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511141124.35429.Josef.Weidendorfer@gmx.de \
    --to=josef.weidendorfer@gmx.de \
    --cc=craig@codefountain.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).