diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-07-13 02:37:42 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-13 11:36:04 -0700 |
commit | ab02dfe533f55535bdb66e05776a4081020322c6 (patch) | |
tree | 09ccb8ff24605bbc2e27d9ee7a69d714400f73eb /t/t4100 | |
parent | Start preparing release notes for 1.5.6.3 (diff) | |
download | tgif-ab02dfe533f55535bdb66e05776a4081020322c6.tar.xz |
bash completion: Improve responsiveness of git-log completion
Junio noticed the bash completion has been taking a long time lately.
Petr Baudis tracked it down to 72e5e989b ("bash: Add space after
unique command name is completed."). Tracing the code showed
we spent significant time inside of this loop within __gitcomp,
due to the string copying overhead.
[28.146109654] _git common over
[28.164791148] gitrefs in
[28.280302268] gitrefs dir out
[28.300939737] gitcomp in
[28.308378112] gitcomp pre-case
* [28.313407453] gitcomp iter in
* [28.701270296] gitcomp iter out
[28.713370786] out normal
Since __git_refs avoids this string copying by forking and using
echo we use the same trick here when we need to finish generating
the names for the caller.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4100')
0 files changed, 0 insertions, 0 deletions