Slow tab completion

asked 2017-10-08 00:24:58 -0500

enzis gravatar image

Bash tab completion is very slow on my Fedora laptop (takes roughly 20 seconds).

Replication steps:

  1. Create new Konsole
  2. Type "cd D [TAB]"
  3. Terminal completely frozen for 20 seconds or so
  4. The following results show up: "Desktop/ Documents/ Downloads/ Dropbox/"

Other notes of interest:

  • The lag only occurs the first time the lag occurs. Tab completion is fast in ALL instances everywhere else thereafter.
  • The lag only occurs when there is more than one result. For the above example, if I type "cd De [TAB]" or "cd Dow [TAB]" it will be instant. But "cd Do [TAB]" will be slow since there are 2 results.
  • As per research, I used "set -x" and "strace" and learned about the "bash_completion" file. See next note.
  • With "set -x" the lag occurs before anything displays. In other words, the lag seems to be before anything from "bash_completion" is executed.
  • I tried deleting all contents of the "bashcompletion" file and rebooted. The lag still occurs, and both set -x and strace yield empty results, so I don't believe the "bashcompletion" file is the problem.
  • I switched back to using the default $PS1, and it made no difference

My Setup:

  • Fedora 25 laptop (from linuxcertified -> about 4 months old)
  • KDE Plasma Version: 5.10.5
  • KDE Frameworks Version: 5.36.0
  • Qt Version: 5.7.1
  • OS Type: 64-bit
edit retag flag offensive close merge delete