From: David Turner <dturner@twopensource.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] commit: don't rewrite shared index unnecessarily
Date: Mon, 31 Aug 2015 14:41:31 -0400 [thread overview]
Message-ID: <1441046491.25570.13.camel@twopensource.com> (raw)
In-Reply-To: <CACsJy8D=KyWBYf1LW=n928rmG=9xavSaR+1G1g+F7mMTKFCpfg@mail.gmail.com>
On Mon, 2015-08-31 at 17:02 +0700, Duy Nguyen wrote:
> On Fri, Aug 28, 2015 at 12:07 AM, David Turner <dturner@twopensource.com> wrote:
> > Remove a cache invalidation which would cause the shared index to be
> > rewritten on as-is commits.
> >
> > When the cache-tree has changed, we need to update it. But we don't
> > necessarily need to update the shared index. So setting
> > active_cache_changed to SOMETHING_CHANGED is unnecessary. Instead, we
> > let update_main_cache_tree just update the CACHE_TREE_CHANGED bit.
> >
> > In order to test this, make test-dump-split-index not segfault on
> > missing replace_bitmap/delete_bitmap. This new codepath is not called
> > now that the test passes, but is necessary to avoid a segfault when the
> > new test is run with the old builtin/commit.c code.
> >
> > Signed-off-by: David Turner <dturner@twopensource.com>
>
> Ack.
>
> I made SOMETHING_CHANGED "1" for catching these cases (there were a
> few on-flight topics when this series was being cooked and I was
> afraid I could not cache all active_cache_changed sites).
>
> > ---
> >
> > I introduced this bug last year while improving the cache-tree code.
> > I guess I probably didn't notice that active_cache_changed wasn't a
> > boolean.
>
> So.. you did you split-index? Cool. Never heard anyone using it for
> real. It needs the other part to improve reading/refresh side to get
> to full potential though..
I am experimenting with an "unskipped index", to reduce the cost of
index loading and processing in sparse checkouts. The unskipped index
is an index on the (v3) index -- that is, it lists the byte offsets of
all entries in the sharedindex where CE_SKIP_WORKTREE is 0. In
addition, there is a list of the offsets of *all* entries, which we can
binary search in. There's also some other metadata that I'm figuring
out as I go along. This might allow us to avoid loading the full shared
index in most cases. Or it might be a total dead end. Not sure yet.
prev parent reply other threads:[~2015-08-31 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 17:07 [PATCH] commit: don't rewrite shared index unnecessarily David Turner
2015-08-31 10:02 ` Duy Nguyen
2015-08-31 15:41 ` Junio C Hamano
2015-08-31 18:41 ` David Turner [this message]
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=1441046491.25570.13.camel@twopensource.com \
--to=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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).