author | Julian Phillips <julian@quantumfyre.co.uk> | |
Tue, 27 Sep 2011 00:00:09 +0000 (01:00 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 27 Sep 2011 01:30:38 +0000 (18:30 -0700) | ||
commit | b4f223c6367bb7aefa00c746c808f5afa7b85331 | |
tree | a2b48efb2e16f45ae72b6535e661708942b81484 | tree | snapshot |
parent | 7ed863a85a6ce2c4ac4476848310b8f917ab41f9 | commit | diff |
Don't sort ref_list too early
get_ref_dir is called recursively for subdirectories, which means that
we were calling sort_ref_list for each directory of refs instead of
once for all the refs. This is a massive wast of processing, so now
just call sort_ref_list on the result of the top-level get_ref_dir, so
that the sort is only done once.
In the common case of only a few different directories of refs the
difference isn't very noticable, but it becomes very noticeable when
you have a large number of direcotries containing refs (e.g. as
created by Gerrit).
Reported by Martin Fick.
Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
get_ref_dir is called recursively for subdirectories, which means that
we were calling sort_ref_list for each directory of refs instead of
once for all the refs. This is a massive wast of processing, so now
just call sort_ref_list on the result of the top-level get_ref_dir, so
that the sort is only done once.
In the common case of only a few different directories of refs the
difference isn't very noticable, but it becomes very noticeable when
you have a large number of direcotries containing refs (e.g. as
created by Gerrit).
Reported by Martin Fick.
Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | diff | blob | history |