Tab completion list takes enormously long time to generate from empty string

Magnus Holmgren magho@home.se
Mon Jan 13 19:26:00 GMT 2003


Greetings.

When I press tab in bash without having typed anything at all (which is somewhat abusive but it easily happens), bash works for 15 minutes, going through $PATH looking for executables (and in the end producing nothing) on a 2x450 MHz PIII. Is that normal?

My $PATH contains the usual /usr/local/bin:/usr/bin:/bin, the WINNT and System32 directories, plus some relatively neglectable ones (18 directories in total), but the number of directories in the path and the time it takes to go through their contents is not the problem. Matching an executable in the last directory in $PATH only takes about 0.2 s. Instead, the huge size of the resulting list seems to be what causes the delay, especially when considering that no disk I/O at all is performed during 14 min 59 sec of the 15 minutes...

I suspect that someone has chosen a sorting algorithm with time complexity O(N^2). Or O(2^N)...

Maybe I can find that out myself.

Cheers,
Magnus


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list