Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Brian Downing <bdowning@lavos.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Dynamic window size on repack?
Date: Sun, 8 Jul 2007 14:35:06 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0707081429500.31544@woody.linux-foundation.org> (raw)
In-Reply-To: <20070708211606.GF4087@lavos.net>



On Sun, 8 Jul 2007, Brian Downing wrote:
> 
> I think what I'd like is an extra option to repack to limit window
> memory usage.  This would dynamically scale the window size down if it
> can't fit within the limit, then scale it back up once you're off of the
> nasty file.  This would let me repack my repository with --window=100
> and have it actually finish someday on the machines I have access to.
> The big file may not be as efficiently packed as possible, but I can
> live with that.
> 
> My question is, is this sane?  Does the repack algorithm depend on having
> a fixed window size to work?  I'd rather not look into implementing this
> if it's silly on the face of it.

It doesn't sound silly, and it should even be fairly easy. The window code 
is all in builtin-pack-objects.c (find_deltas()) and while it's currently 
coded for a constant-sized window, it shouldn't be too hard to free more 
old entries if you allocate one big one to make sure that the "array" 
thing doesn't grow to contain too much data.

In other words, just look at how the variables "struct unpacked *array" 
(the whole window array) and the "struct unpacked *n" (the "next entry" in 
the array using a simple circular queue using "idx") are accessed.

		Linus

  parent reply	other threads:[~2007-07-08 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08 21:16 [RFC] Dynamic window size on repack? Brian Downing
2007-07-08 21:35 ` Dana How
2007-07-08 21:35 ` Linus Torvalds [this message]
2007-07-08 21:39   ` Linus Torvalds

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=alpine.LFD.0.999.0707081429500.31544@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=bdowning@lavos.net \
    --cc=git@vger.kernel.org \
    /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