summaryrefslogtreecommitdiff
path: root/reset.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-05-28 11:23:49 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-28 18:38:07 +0900
commitf4dc9432fd287bde9100488943baf3c6a04d90d1 (patch)
tree62e9d43e40f1901413b20c6d48f82943b4c80b39 /reset.c
parentsend-email: get rid of indirect object syntax (diff)
downloadtgif-f4dc9432fd287bde9100488943baf3c6a04d90d1.tar.xz
send-email: lazily load modules for a big speedup
Optimize the time git-send-email takes to do even the simplest of things (such as serving up "-h") from around ~150ms to ~80ms-~90ms by lazily loading the modules it requires. Before this change Devel::TraceUse would report 99/97 used modules under NO_GETTEXT=[|Y], respectively. Now it's 52/37. It now takes ~15s to run t9001-send-email.sh, down from ~20s. Changing File::Spec::Functions::{catdir,catfile} to invoking class methods on File::Spec itself is idiomatic. See [1] for a more elaborate explanation, the resulting code behaves the same way, just without the now-pointless function wrapper. 1. http://lore.kernel.org/git/8735u8mmj9.fsf@evledraar.gmail.com Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reset.c')
0 files changed, 0 insertions, 0 deletions