author | Junio C Hamano <junkio@cox.net> | |
Thu, 27 Apr 2006 07:13:34 +0000 (00:13 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 27 Apr 2006 07:34:12 +0000 (00:34 -0700) | ||
commit | b34c39cf31e370dad3bcfba29ee8cd023c40fd6b | |
tree | fc87c8293aefebb4a7a4da0733cffdb36768ffa9 | tree | snapshot |
parent | 497c32136f80aca5f724bf70c2a0f44b63cb79f1 | commit | diff |
read-tree: teach 1 and 2 way merges about cache-tree.
This teaches one-way and two-way "read-tree -m" (and its special
form, "read-tree --reset" as well) not to discard cache-tree but
invalidate only the changed parts of the tree. When switching
between related branches, this helps the eventual commit
(i.e. write-tree) by keeping cache-tree valid as much as
possible.
This does not prime cache-tree yet, but we ought to be able to
do that for no-merge (i.e. reading from a tree object) case and,
and also perhaps 1 way merge case.
With this patch applied, switching between the tip of Linux 2.6
kernel tree and a branch that touches one path (fs/ext3/Makefile)
from it invalidates only 3 paths out of 1201 cache-tree entries
in the index, and subsequent write-tree takes about a half as
much time as before.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This teaches one-way and two-way "read-tree -m" (and its special
form, "read-tree --reset" as well) not to discard cache-tree but
invalidate only the changed parts of the tree. When switching
between related branches, this helps the eventual commit
(i.e. write-tree) by keeping cache-tree valid as much as
possible.
This does not prime cache-tree yet, but we ought to be able to
do that for no-merge (i.e. reading from a tree object) case and,
and also perhaps 1 way merge case.
With this patch applied, switching between the tip of Linux 2.6
kernel tree and a branch that touches one path (fs/ext3/Makefile)
from it invalidates only 3 paths out of 1201 cache-tree entries
in the index, and subsequent write-tree takes about a half as
much time as before.
Signed-off-by: Junio C Hamano <junkio@cox.net>
read-tree.c | diff | blob | history |