From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Junio C Hamano" <junkio@cox.net>
Subject: [PATCH] Speedup recursive by flushing index only once for all entries
Date: Thu, 4 Jan 2007 11:47:19 +0100 [thread overview]
Message-ID: <81b0412b0701040247k47e398e6q34dd5233bb5706f6@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 585 bytes --]
Merge-recursive is very slow in repos with lots of files,
especially if lots of them change absolutely identically.
Updating index once after all of them changes speedups
merge quite noticable.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Johannes, I remember suggesting to do index flush for all
entries instead for every entry. It is already quite time ago,
but ... was there any reasons for not doing this?
The patch speeds it up a lot and no wonder: index is 6Mb
here, and this is cygwin.
merge-recursive.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
[-- Attachment #2: 0001-Speedup-recursive-by-flushing-index-only-once-for-all-entries.txt --]
[-- Type: text/plain, Size: 972 bytes --]
From d0e4d791cef8b307b32954a8b80c4aabd41755a9 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Thu, 4 Jan 2007 11:22:47 +0100
Subject: Speedup recursive by flushing index only once for all entries
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
merge-recursive.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index bac16f5..4d3a2ce 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1083,9 +1083,6 @@ static int process_entry(const char *path, struct stage_data *entry,
} else
die("Fatal merge failure, shouldn't happen.");
- if (cache_dirty)
- flush_cache();
-
return clean_merge;
}
@@ -1133,6 +1130,8 @@ static int merge_trees(struct tree *head,
if (!process_entry(path, e, branch1, branch2))
clean = 0;
}
+ if (cache_dirty)
+ flush_cache();
path_list_clear(re_merge, 0);
path_list_clear(re_head, 0);
--
1.5.0.rc0.g8bc4b-dirty
next reply other threads:[~2007-01-04 10:47 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 10:47 Alex Riesen [this message]
2007-01-04 12:33 ` [PATCH] Speedup recursive by flushing index only once for all entries Johannes Schindelin
2007-01-04 12:47 ` Alex Riesen
2007-01-04 20:22 ` Junio C Hamano
2007-01-05 11:22 ` Alex Riesen
2007-01-07 16:31 ` Alex Riesen
2007-01-10 18:06 ` Junio C Hamano
2007-01-10 19:28 ` Junio C Hamano
2007-01-10 22:11 ` Junio C Hamano
2007-01-10 23:07 ` Alex Riesen
2007-01-10 23:23 ` Linus Torvalds
2007-01-11 8:14 ` Johannes Schindelin
2007-01-11 9:03 ` Alex Riesen
2007-01-11 12:11 ` Alex Riesen
2007-01-11 20:37 ` Junio C Hamano
2007-01-11 9:02 ` Alex Riesen
2007-01-11 16:38 ` Linus Torvalds
2007-01-11 17:43 ` Alex Riesen
2007-01-11 18:02 ` Linus Torvalds
2007-01-11 21:48 ` Alex Riesen
2007-01-11 20:23 ` Junio C Hamano
2007-01-11 22:10 ` Alex Riesen
2007-01-11 22:28 ` Linus Torvalds
2007-01-11 23:53 ` Junio C Hamano
2007-01-12 0:18 ` Alex Riesen
2007-01-11 0:34 ` Junio C Hamano
2007-01-11 8:15 ` Johannes Schindelin
2007-01-12 15:48 ` Sergey Vlasov
2007-01-12 17:38 ` Alex Riesen
2007-01-12 20:37 ` Sergey Vlasov
2007-01-12 18:23 ` Junio C Hamano
2007-01-12 20:09 ` [PATCH] merge-recursive: do not report the resulting tree object name Junio C Hamano
2007-01-12 23:36 ` Johannes Schindelin
2007-01-13 0:32 ` Junio C Hamano
2007-01-13 0:57 ` Jakub Narebski
2007-01-13 11:01 ` Johannes Schindelin
2007-01-13 5:14 ` Shawn O. Pearce
2007-01-13 7:03 ` Junio C Hamano
2007-01-12 20:30 ` [PATCH] Speedup recursive by flushing index only once for all entries Alex Riesen
2007-01-12 21:07 ` Sergey Vlasov
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=81b0412b0701040247k47e398e6q34dd5233bb5706f6@mail.gmail.com \
--to=raa.lkml@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).