Use a hashtable for objects instead of a sorted list
In a simple test, this brings down the CPU time from 47 sec to 22 sec. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
5b766ea901
commit
070879ca93
@ -61,9 +61,12 @@ static void check_connectivity(void)
|
||||
int i;
|
||||
|
||||
/* Look up all the requirements, warn about missing objects.. */
|
||||
for (i = 0; i < nr_objs; i++) {
|
||||
for (i = 0; i < obj_allocs; i++) {
|
||||
struct object *obj = objs[i];
|
||||
|
||||
if (!obj)
|
||||
continue;
|
||||
|
||||
if (!obj->parsed) {
|
||||
if (!standalone && has_sha1_file(obj->sha1))
|
||||
; /* it is in pack */
|
||||
|
||||
Reference in New Issue
Block a user