#603816 zsh: git checkout completion performance regression

Package:
zsh
Source:
zsh
Description:
shell with lots of features
Submitter:
Kan-Ru Chen
Date:
2010-11-17 15:39:05 UTC
Severity:
normal
#603816#5
Date:
2010-11-17 14:59:52 UTC
From:
To:
Hi,

The changelog says

    * Various git completion fixes.

I was glad that someone finally fixed the git completion, but it turns
out it's even worse.

Previous zsh (4.3.10-16) spends a lot time on completing 'git checkout' from the
project root, but at least it's quite fast on the leaf directory.

But zsh (4.3.10-17) is just way too slow. Merely 'git checkout<tab>'
inside the kernel tree would block the terminal for 3 minutes.

For example (both were tested inside a cached kernel tree), completion
inside the linux-2.6/Documentation, profiled by zprof:

version               time                       self            name
- ----------------------------------------------------------------------------
4.3.10-16   220.65     220.65     50.10%    0.19  0.19  0.04%  _git-checkout
4.3.10-17   162868.15  162868.15  99.87%    0.17  0.17  0.00%  _git-checkout

Full profile result was attached.

Regards,
Kanru

- -- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.36-rc4+ (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages zsh depends on:
ii  libc6                     2.11.2-7       Embedded GNU C Library: Shared lib
ii  libcap2                   1:2.19-3       support for getting/setting POSIX.
ii  libncursesw5              5.7+20100313-4 shared libraries for terminal hand

Versions of packages zsh recommends:
ii  libc6                         2.11.2-7   Embedded GNU C Library: Shared lib
ii  libpcre3                      8.02-1.1   Perl 5 Compatible Regular Expressi

Versions of packages zsh suggests:
pn  zsh-doc                       <none>     (no description available)

- -- no debconf information
iEYEARECAAYFAkzj7eIACgkQsbdbXzZcx6KZxACgzoQxx38ZFf7fJh0tPc+718kB
X8sAn3Snk/EJ/wE/sGPa9VVcjRUty6ey
=vH4a
-----END PGP SIGNATURE-----