git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH v3 0/3] nd/index-pack-no-recurse
Date: Sat, 14 Jan 2012 19:19:52 +0700	[thread overview]
Message-ID: <1326543595-28300-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1326081546-29320-1-git-send-email-pclouds@gmail.com>

This round adds more explanation in commit message of 2/3 and comment
before get_base_data() in 3/3. Changes in 3/3 does not really address
Junio's concern regarding maintainability though.

It also fixes a regression in 3/3. In current code, get_base_data()
goes up as far as the first deflated parent. v2 of this series always
goes up to top parent. v3 fixes this.

Junio raised a point about depth-first vs breadth-first search in 1/3. I
have not addressed that either, but it makes me wonder if we may
benefit from using bfs in find_unresolved_deltas(), 2/3. If the delta
chains form a fork-like figure (e.g. long delta chains sharing common
base), then we may run out of cache doing dfs on one chain, by the
time we get back on the common base, we would need to deflate them
again.

Another observation is recursion in get_base_data() is unlikely to be
called in real life. With 16M default delta base cache, git.git does
not trigger it at all. Perhaps repos with large blobs have better chance..

Nguyễn Thái Ngọc Duy (3):
  Eliminate recursion in setting/clearing marks in commit list
  index-pack: eliminate recursion in find_unresolved_deltas
  index-pack: eliminate unlimited recursion in get_base_data()

 builtin/index-pack.c |  164 ++++++++++++++++++++++++++++++++++---------------
 commit.c             |   13 ++++-
 revision.c           |   45 +++++++++-----
 3 files changed, 154 insertions(+), 68 deletions(-)

-- 
1.7.8.36.g69ee2

  parent reply	other threads:[~2012-01-14 12:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-26 12:04 [PATCH 1/3] Eliminate recursion in setting/clearing marks in commit list Nguyễn Thái Ngọc Duy
2011-12-26 12:04 ` [PATCH 2/3] index-pack: eliminate recursion in find_unresolved_deltas Nguyễn Thái Ngọc Duy
2011-12-26 12:04 ` [PATCH 3/3] index-pack: eliminate unlimited recursion in get_delta_base() Nguyễn Thái Ngọc Duy
2012-01-09  3:59 ` [PATCH v2 0/3] nd/index-pack-no-recurse Nguyễn Thái Ngọc Duy
2012-01-09 19:30   ` Junio C Hamano
2012-01-14 12:19   ` Nguyễn Thái Ngọc Duy [this message]
2012-01-14 12:19     ` [PATCH v3 1/3] Eliminate recursion in setting/clearing marks in commit list Nguyễn Thái Ngọc Duy
2012-01-14 15:23       ` Peter Baumann
2012-01-15  9:25         ` Nguyen Thai Ngoc Duy
2012-01-14 12:19     ` [PATCH v3 2/3] index-pack: eliminate recursion in find_unresolved_deltas Nguyễn Thái Ngọc Duy
2012-01-14 12:19     ` [PATCH v3 3/3] index-pack: eliminate unlimited recursion in get_base_data() Nguyễn Thái Ngọc Duy
2012-01-09  3:59 ` [PATCH v2 1/3] Eliminate recursion in setting/clearing marks in commit list Nguyễn Thái Ngọc Duy
2012-01-09 22:09   ` Junio C Hamano
2012-01-09  3:59 ` [PATCH v2 2/3] index-pack: eliminate recursion in find_unresolved_deltas Nguyễn Thái Ngọc Duy
2012-01-09 22:10   ` Junio C Hamano
2012-01-10 12:23     ` Nguyen Thai Ngoc Duy
2012-01-12 20:32       ` Junio C Hamano
2012-01-09  3:59 ` [PATCH v2 3/3] index-pack: eliminate unlimited recursion in get_delta_base() Nguyễn Thái Ngọc Duy
2012-01-09 22:51   ` Junio C Hamano
2012-01-10 13:03     ` Nguyen Thai Ngoc Duy
2012-01-10 13:16       ` Nguyen Thai Ngoc Duy

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=1326543595-28300-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.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;
as well as URLs for NNTP newsgroup(s).