bash autocompletion is slow, freezing my desktop

5

sometimes when working with a custom kernel, pressing tab in the bash autocompletes at a horrible pace. It freezes the whole desktop. Then comes back after awhile. This is the only quirk that I've encountered with my many custom kernels. They all have it, occasionally. why?

I sure have a lot of ubuntu packages installed but this occurs with autocompletion not only for binary programs on the command line but even for arguments to programs and files as arguments, in directories where there are few files (e.g., ls a__ , with 15 files in the directory, will hang on that 'a' for 45 seconds). This also never happens with the ubuntu standard included kernel. And it doesn't happen for every log in, either. Sometimes it seems like, if I haven't started the system with a given custom kernel for awhile, that kernel will do this, as if it has to "warm up" before it performs adequately. Like, it either needs a system reboot or it needs 15 minutes to be left alone, after first login.

user108754

Posted 2013-04-10T17:33:47.660

Reputation: 161

2

You could type set -vx<ENTER> and try tab again to see what is slowing down the action. (Ref. here and here)

– taper – 2018-04-06T08:14:50.480

1Do you have large numbers of files in some directories? Are you seeing correctable disk errors? – Fred – 2013-04-10T18:00:34.643

just answered your question in second paragraph of my question. – user108754 – 2013-04-10T18:22:44.000

I was thinking it might be failing disk sectors that the controller has to retry again and again, and relocate the failing sector. If your drive is going bad, that might explain the "warm up" perception; a few sectors go marginal in the downtime, and these have to be recovered and relocated. Maybe. Check your disk's health with things like smartmontools and vendor self-tests. That's all I can think of. – Fred – 2013-04-10T21:01:34.107

Are you using the same version of bash in both cases? Do you have the bash-completion package installed/enabled in both? – Doug Harris – 2013-04-15T18:06:53.503

No answers