Re: [PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-09 Thread Junio C Hamano
Junio C Hamano writes: >> Yes. But I think the default limit for the number of loose objects, 7000, >> gives us small overhead when we do enumeration of all objects. > > Hmph, I didn't see the code that does the estimation of loose object > count before starting to enumerate, though. Another thi

Re: [PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-09 Thread Junio C Hamano
Takuto Ikuta writes: > Yes, I just wanted to say 'git fetch' invokes fetch-pack. > fetch-pack is skipped when running git fetch repeatedly while > remote has no update by quickfetch. So I disabled it to see the > performance of fetch-pack. In chromium repository, master branch > is updated severa

Re: [PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-09 Thread Takuto Ikuta
2018-03-09 3:42 GMT+09:00 Junio C Hamano : > Takuto Ikuta writes: >> This patch stores existing loose objects in hashmap beforehand and use >> it to check existence instead of using lstat. >> >> With this patch, the number of lstat calls in `git fetch` is reduced >> from 411412 to 13794 for chromi

Re: [PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-09 Thread Takuto Ikuta
2018-03-09 2:19 GMT+09:00 René Scharfe : > Am 08.03.2018 um 13:06 schrieb Takuto Ikuta: >> +static int add_loose_objects_to_set(const struct object_id *oid, >> + const char *path, >> + void *data) >> +{ >> + struct oidset* set = (s

Re: [PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-08 Thread Junio C Hamano
Takuto Ikuta writes: > In repository having large number of refs, lstat for non-existing loose > objects makes `git fetch` slow. It is not immediately clear how "large number of refs" and "lstat for loose objects" interact with each other to create a problem. "In repository having large number o

Re: [PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-08 Thread René Scharfe
Am 08.03.2018 um 13:06 schrieb Takuto Ikuta: > In repository having large number of refs, lstat for non-existing loose > objects makes `git fetch` slow. > > This patch stores existing loose objects in hashmap beforehand and use > it to check existence instead of using lstat. > > With this patch,

[PATCH] fetch-pack.c: use oidset to check existence of loose object

2018-03-08 Thread Takuto Ikuta
In repository having large number of refs, lstat for non-existing loose objects makes `git fetch` slow. This patch stores existing loose objects in hashmap beforehand and use it to check existence instead of using lstat. With this patch, the number of lstat calls in `git fetch` is reduced from 41