git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] cache-tree: populate cache-tree on successful merge

From
David Turner <dturner@twopensource.com>
Date
Jul 28, 2015, 19:54 UTC
Message-ID
<1438113266.18134.26.camel@twopensource.com>
In-Reply-To
<xmqqa8ugdpu7.fsf@gitster.dls.corp.google.com>
On Tue, 2015-07-28 at 12:50 -0700, Junio C Hamano wrote:
Show 12 quoted lines
> David Turner <dturner@twopensource.com> writes:
> 
> > When we unpack trees into an existing index, we discard the old index
> > and replace it with the new, merged index.  Ensure that this index has
> > its cache-tree populated.  This will make subsequent git status and
> > commit commands faster.
> 
> Wouldn't it make repeated calls to "git merge" and friends to build
> a long history slower, when the user does not run "git status" in
> between?  E.g. "git cherry-pick -4 $other_topic", where you would
> not even have a chance to run "git status" in the middle.  What do
> the pros-and-cons look like?
I have not benchmarked, but I suspect it would not make those slower.

The work done to produce the cache-tree is work that the commit would otherwise have to do. So we're spending extra time in one place to eliminate that work in a different place.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “cache-tree: populate cache-tree on successful merge”
  1. cache-tree: populate cache-tree on successful mergeDavid Turner, Jul 28, 2015
  2. Junio C HamanoJul 28, 2015
  3. David TurnerJul 28, 2015
  4. Junio C HamanoJul 28, 2015
  5. Junio C HamanoJul 28, 2015
  6. David TurnerJul 28, 2015
  7. Junio C HamanoJul 28, 2015
  8. Junio C HamanoJul 28, 2015
  9. David TurnerJul 28, 2015
  10. Junio C HamanoJul 28, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.