[Bash-completion-devel] After adding bash-completion to .bashrc loading prompt is slow
David Paleino
dapal at debian.org
Wed Apr 6 07:56:48 UTC 2011
On Tue, 05 Apr 2011 19:47:53 +0300, Ville Skyttä wrote:
> On 04/05/2011 09:36 AM, David Paleino wrote:
>
> [..]
> > I'll check which third-party completion is being so slow for me (and
> > eventually report bugs where appropriate).
>
> Just a thought, I haven't actually checked how bash behaves under the
> hood: if loading the completions on your system is heavily I/O bound,
> and the changes I made (have foo || return) just help with the CPU
> pressure, the savings won't be that noticeable.
>
> Can you find out whether the loading process is CPU or I/O bound on your
> system?
How?
> FWIW both the systems I tested with have their filesystems mounted with
> noatime (one has ext4, the other ext3). That might be worth trying out
> if you don't already have it.
I'll try, thanks.
> [..]
> > For
> > Debian-based systems I'm thinking at some post-installation hook, which
> > checks what's been installed in $PATH, and makes appropriate links to
> > $BASH_COMP_DIR. I'll need to think this better though.
>
> I don't know if Debian has a concept of package triggers, but that
> mechanism works pretty well for rpm based systems in this case. E.g.
> "when you install package foo, we know/assume it will contain these
> commands, symlink their completions to BASH_COMPLETION_DIR" and
> similarly for package removals.
Yes, we have something like that. I haven't implemented it yet though,
because: a) lack of time, b) I've never done it, so I must document myself
thoroughly before doing anything :), c) I should move completions out of
BASH_COMPLETION_DIR (so maybe I'll start the layout redesign we want to do
upstream in the Debian package).
I really just need an afternoon or two to get all this :). Maybe today I'll
do ;)
> Here's the current Fedora specfile for reference:
> http://pkgs.fedoraproject.org/gitweb/?p=bash-completion.git;a=blob;f=bash-completion.spec
Thanks, I'll have a look.
David
--
. ''`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20110406/7ddc1062/attachment.pgp>
More information about the Bash-completion-devel
mailing list