From: Junio C Hamano <gitster@pobox•com>
To: David Turner <dturner@twopensource•com>
Cc: git@vger•kernel.org, David Turner <dturner@twitter•com>
Subject: Re: [PATCH 1/3] cache-tree: Create/update cache-tree on checkout
Date: Mon, 07 Jul 2014 09:58:14 -0700 [thread overview]
Message-ID: <xmqq4mytf6mx.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1404619467.3109.38.camel@stross> (David Turner's message of "Sat, 05 Jul 2014 21:04:27 -0700")
David Turner <dturner@twopensource•com> writes:
>> I am not convinced that doing an equivalent of write-tree when you
>> switch branches is the right approach in the first place. You will
>> eventually write it out as a tree, and having a relatively undamaged
>> cache-tree will help you when you do so, but spending the cycles
>> necessary to compute a fully populated cache-tree, only to let it
>> degrade over time until you are ready to write it out as a tree,
>> somehow sounds like asking for a duplicated work upfront.
>
> As I understand it, the cache-tree extension was originally designed to
> speed up writing the tree later. However, as Karsten Blees's work (and
> my own tests) have shown, it also speeds up git status. I use git
> status a lot while working, and I've talked to a few others who do the
> same. So I think it's worth spending extra time when switching branches
> to have a good working experience within that branch.
You are reading the history of the subsystem correctly. Since
b65982b6 (Optimize "diff-index --cached" using cache-tree,
2009-05-20), having an undamaged cache-tree does help with "git
status" as well.
> In the new version of the patchset (which I'll post shortly), I've added
> an option WRITE_TREE_REPAIR, which does all of the work to compute a new
> tree object, but only adds it to the cache-tree if it already exists
> on-disk. This is a little wasteful for the reason that you note. So if
> you would like, I could add a config option to skip it. But I think it
> is a good default.
OK, sounds good.
next prev parent reply other threads:[~2014-07-07 16:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 0:13 [PATCH 1/3] cache-tree: Create/update cache-tree on checkout David Turner
2014-07-01 0:13 ` [PATCH 2/3] test-dump-cache-tree: Improve output format and exit code David Turner
2014-07-01 4:43 ` Eric Sunshine
2014-07-01 0:13 ` [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit David Turner
2014-07-01 4:26 ` Torsten Bögershausen
2014-07-01 5:49 ` Johannes Sixt
2014-07-01 4:16 ` [PATCH 1/3] cache-tree: Create/update cache-tree on checkout Torsten Bögershausen
2014-07-01 19:15 ` David Turner
2014-07-01 21:03 ` Junio C Hamano
2014-07-01 22:09 ` David Turner
2014-07-01 20:15 ` Junio C Hamano
2014-07-06 4:04 ` David Turner
2014-07-07 16:58 ` Junio C Hamano [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-07-01 19:14 David Turner
2014-07-01 21:08 ` Junio C Hamano
2014-06-28 0:20 David Turner
2014-06-29 3:33 ` Duy Nguyen
2014-06-30 18:13 ` Junio C Hamano
2014-06-30 6:31 ` 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=xmqq4mytf6mx.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=dturner@twitter$(echo .)com \
--cc=dturner@twopensource$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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