From 2c08b3638339f9b73128c41a4882e115222608a3 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 21 Sep 2005 20:34:29 +0400 Subject: [PATCH] fetch.c: Remove call to parse_object() from process() The call to parse_object() in process() is not actually needed - if the object type is unknown, parse_object() will be called by loop(); if the type is known, the object will be parsed by the appropriate process_*() function. After this change blobs which exist locally are no longer parsed, which gives about 2x CPU usage improvement; the downside is that there will be no warnings for existing corrupted blobs, but detecting such corruption is the job of git-fsck-objects, not the fetch programs. Newly fetched objects are still checked for corruption in http-fetch.c and ssh-fetch.c (local-fetch.c does not seem to do it, but the removed parse_object() call would not be reached for new objects anyway). Signed-off-by: Sergey Vlasov Signed-off-by: Junio C Hamano diff --git a/fetch.c b/fetch.c index b92ca80..e6fd624 100644 --- a/fetch.c +++ b/fetch.c @@ -134,7 +134,6 @@ static int process(struct object *obj) obj->flags |= SEEN; if (has_sha1_file(obj->sha1)) { - parse_object(obj->sha1); /* We already have it, so we should scan it now. */ obj->flags |= TO_SCAN; } else { -- cgit v0.10.2-6-g49f6