Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] pack-objects: emit base before delta.
Date: Fri, 1 Jul 2005 08:28:07 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0507010821140.14331@ppc970.osdl.org> (raw)
In-Reply-To: <7vbr5nxe38.fsf@assigned-by-dhcp.cox.net>



On Thu, 30 Jun 2005, Junio C Hamano wrote:
>
> This micro-optimizes the order of objects in a pack.  By
> emitting base objects before deltified ones, unpack-objects do
> not keep items on delta_list.

So I like this from an unpacking standpoint, but at the same time I don't 
actually think it's correct from an access pattern standpoint.

When using a pack file as a run-time object store, the current packing 
order means that we generally traverse the pack-file in a nice forward 
direction. We don't jump backwards in the file very much, which should be 
good both for CPU and disk caches (both of them tend to have prefetch 
logic that often works better for nice access patterns). So I was actually 
pretty happy with the fact that we packed "optimally" in this sense: if 
the object was an important delta (ie an early one), we'd basically end up 
always walking forward until we hit the object it was a delta against.

I dunno. Maybe it doesn't matter. Our other heuristics to pack recent 
objects before later one might mean that we tend to have mainly 
backwards-going deltas (both in history _and_ in pack file layout).

The expense of keeping track of delta objects isn't that high, and the 
"pending delta" logic in unpack-objects isn't that complicated, so ..

Do you have some other reason you want to do this?

		Linus

  parent reply	other threads:[~2005-07-01 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01  5:58 [PATCH] pack-objects: emit base before delta Junio C Hamano
2005-07-01  6:18 ` Junio C Hamano
2005-07-01 15:28 ` Linus Torvalds [this message]
2005-07-01 15:40   ` 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=Pine.LNX.4.58.0507010821140.14331@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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