-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bash-completion] Slow when entering make xxx commands when building kernel #389
Comments
Thank you for the report. I first would like to confirm the problem. The answer would largely depend on the situation, and I have to avoid preparing answers for every case because the answer would tend to be long in any case.
If you are running the build process in the background, it is somewhat expected. Building the Linux kernel consumes much computational resources. Every application can be slow while building the kernel. It's not specific to ble.sh. Maybe the plain Bash doesn't become as slow as ble.sh while building the kernel, but it is related to how much stuff ble.sh does more than the plain Bash. In particular, ble.sh touches filesystems to generate the candidates for autosuggestions while you are typing. This can be particularly slow since the I/O would likely be blocking while building the Linux kernel. |
I mean when I input make xxx into ble.sh in the source directory of the Linux kernel inside the source directory of the Linux kernel (without building the Linux kernel in the background), the response of ble.sh becomes slow. Sorry I didn't make it clear. |
OK, thank you for your clarification! I'd first suspect the completion setting for the
$ bleopt complete_auto_complete=
$ make xxx # <-- Is the response faster here?
$ complete -p make |
Q1: Yes.
After typing
|
Thank you. The results you provided imply that the delay is caused by the processing of
$ time make -npq __BASH_MAKE_COMPLETION__=1 .DEFAULT &>/dev/null | wc -l
$ time make -npq __BASH_MAKE_COMPLETION__=1 .DEFAULT 2>/dev/null | sed -ne "$(_make_target_extract_script)" | wc -l |
Q3:
|
Thank you for checking.
This means that the bash-completion version seems different from mine.
$ ble/widget/display-shell-version
$ type _make |
Q4: It seems to be stuck there forever. But after inputting
Q5:
Q6:
|
Thanks for those results. A major delay seems to come from the execution time of I made an experimental patch.
# End of ~/.bashrc
__load_completion make
function ble/complete/progcomp/patch:bash-completion/_comp_make.advice {
ble/function#push "${ADVICE_WORDS[1]}" '
local -a make_args; make_args=("${ADVICE_WORDS[1]}" "$@")
ble/util/conditional-sync \
'\''command "${make_args[@]}"'\'' \
"! ble/complete/check-cancel <&$_ble_util_fd_stdin" 128 progressive-weight:killall'
ble/function#advice/do
ble/function#pop "${ADVICE_WORDS[1]}"
}
ble/function#advice around _make ble/complete/progcomp/patch:bash-completion/_comp_make.advice |
Q7: Yes. |
Thank you!
What does that mean? "You can add the setting and see it" or "The behavior improves"? |
The behavior improves. |
Thank you! Then, I'll later add these settings in the master version with some adjustments. |
I added those workarounds in commit 5f3a001. Could you check if the problem doesn't arise in the latest version (without having the adjustments in #389 (comment) in your own |
Solved, thank you! |
Thank you for checking! Also, thank you for your report and patience! |
ble version: 0.4.0-devel4+9641c3b
Bash version: 5.1.16(1)-release (x86_64-pc-linux-gnu)
Slow when entering kernel
make xxx
(e.g.make menuconfig
,make install
) commands when building kernel.The text was updated successfully, but these errors were encountered: