From: Takuto Ikuta <tikuta@google.com>
To: git@vger.kernel.org
Subject: [PATCH] Use OBJECT_INFO_QUICK to speedup git fetch-pack
Date: Mon, 27 Nov 2017 04:27:47 +0000 [thread overview]
Message-ID: <0102015ffbbb2905-570eadd1-6b5c-46af-a3a9-bddfbd01c242-000000@eu-west-1.amazonses.com> (raw)
Do not call prepare_packed_git for every refs.
In fetch-pack, git list ups entries in .git/objects/pack
directory for each refs.
Such behavior makes git fetch-pack slow for the repository having the
large number of refs, especially for windows.
For chromium repository, having more than 300000 remote refs, git fetch
takes more than 3 minutes if fetch-pack runs on my windows workstation.
This patch improves the time to around 17 seconds in the same machine.
Signed-off-by: Takuto Ikuta <tikuta@google.com>
---
fetch-pack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fetch-pack.c b/fetch-pack.c
index 008b25d3db087..0184584e80599 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -716,7 +716,7 @@ static int everything_local(struct fetch_pack_args *args,
for (ref = *refs; ref; ref = ref->next) {
struct object *o;
- if (!has_object_file(&ref->old_oid))
+ if (!has_object_file_with_flags(&ref->old_oid, OBJECT_INFO_QUICK))
continue;
o = parse_object(&ref->old_oid);
--
https://github.com/git/git/pull/437
next reply other threads:[~2017-11-27 4:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 4:27 Takuto Ikuta [this message]
2017-11-27 4:35 ` [PATCH] Use OBJECT_INFO_QUICK to speedup git fetch-pack Junio C Hamano
2017-11-27 4:37 ` Jeff King
2017-11-27 4:53 ` Junio C Hamano
2017-11-27 5:01 ` Takuto Ikuta
2017-11-27 21:24 ` Johannes Schindelin
2017-11-27 23:52 ` Junio C Hamano
2017-11-28 0:33 ` Johannes Schindelin
2017-11-28 1:58 ` Takuto Ikuta
2017-11-28 11:27 ` Johannes Schindelin
2017-11-28 11:35 ` Takuto Ikuta
2017-11-27 5:04 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0102015ffbbb2905-570eadd1-6b5c-46af-a3a9-bddfbd01c242-000000@eu-west-1.amazonses.com \
--to=tikuta@google.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).