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:
Johannes Schindelin
2006-02-12 02:57:57 +01:00
committed by Junio C Hamano
parent 5b766ea901
commit 070879ca93
4 changed files with 47 additions and 32 deletions

View File

@ -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 */