author | Sergey Vlasov <vsu@altlinux.ru> | |
Wed, 21 Sep 2005 16:34:29 +0000 (20:34 +0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Sep 2005 19:32:33 +0000 (12:32 -0700) | ||
commit | 4041483e5a3d2010e038ec686ef1638cde659f0b | |
tree | 03aa935cc5161e014eb48e1741941069f86f7bc1 | tree | snapshot |
parent | 478dbeec9936e4556a9232f1fd908ffe2a96a723 | commit | diff |
[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 <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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 <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
fetch.c | diff | blob | history |