-
-
Notifications
You must be signed in to change notification settings - Fork 118
Description
ble version: 0.4.0-devel3+0506df2
Bash version: 5.0.17(1)-release, x86_64-pc-linux-gnu
Hi. This project is great.
Basically I'm having performance issues, there is a perceptible delay between my key strokes and the letter appearing on the screen. Is this something that should be expected ? I'm currently under Ubuntu 20.04 on WSL2. I'm coming from zsh and I would really love to use bash, but syntax-hightlight and autocomplete features like the ones you provide are a must have. However performance issues are a deal breaker.
I see there are other open issues related to performance, but I saw they were more specifically related to autocomplete or some other features. Please let me know if I should close this and continue the discussion in those open issues.
Summary
(Edited by @akinomyoga)
Here I summarize the discussions made here. There can be various causes that slows down the response in WSL2. Depending on the actual bottleneck in your environment, maybe you can take the following workarounds.
Remove slow Windows filesystems on /mnt from PATH
It is known that the Windows filesystems mounted on /mnt is very slow microsoft/WSL#4197. When PATH contains directories under /mnt, the completion becomes slow. One solution is to remove /mnt/* from the environment variable PATH:
From #96 (comment)
If you are fine with removing all the Windows paths from
PATH, you can just put the following command in yourblerc:ble/path#remove-glob PATH '/mnt/*'
Another solution is to configure wsl so that it doesn't include Windows paths in the environment variable on the startup of the shell:
From #96 (comment)
You can also create a file called
/etc/wsl.confand put this:[interop] appendWindowsPath = falseMore info can be found in WSL's docs here.
Integration with bash-preexec to remove the overhead of DEBUG trap
This has been solved by introducing a proper support for the integration of ble.sh and bash-preexec. When bash-preexec is loaded, ble.sh automatically detects it and properly communicate with the loaded bash-preexec. Please just update ble.sh to the latest master. See also #96 (comment).
Disable auto-complete
If the above settings does not work, maybe you can turn off auto-complete or set a delay for auto-complete.
From #96 (comment)
$ bleopt complete_auto_complete=[...] you can configure bleopt complete_auto_delay (the delay of auto-complete) so as to reduce the frequency of auto-complete, e.g.,
# blerc bleopt complete_auto_delay=300