Re: [StGIT PATCH] StGIT bash completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2006-11-16 16:12:43 +0000, Catalin Marinas wrote:

> Indeed, stg help takes over 200ms on my machine as well, with hot
> caches but this is mainly because it imports all the
> stgit.commands.* modules in order to read the short description. The
> 'stg help <command>' takes around 90ms on my machine since it only
> imports one module

Excellent. However, this suggests that an option should be added to
stg that makes it print just the subcommand names, without importing
anything, to get this kind of speed there as well. Call it
--generate-tab-completion or something, and don't print it in the help
output.

> (I actually reduced it to 85ms by minimizing the imports even
> further).

Goodie. For reference, I think git was able to list its subcommands in
about 20 ms. Just so you know what to aim for. :-)

> I could actually hard-code the commands only in the script. At the
> moment I removed the _stg_* functions and added some common
> _stg_all_patches() to avoid duplicating the code (see attached).

Seems reasonable.

Next time I do some StGIT hacking (not this weekend, unfortunately), I
was planning to build more tab-completion stuff. On top of my list are
fixing basic completion for all subcommands, and fixing some kind of
filename completion. But do feel free to do it first if you like. :-)

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]