-
Notifications
You must be signed in to change notification settings - Fork 417
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: use sqlite cache when available (BZ: 1815895) #1817
Conversation
Use /var/cache/dnf/packages.db to make SQL requests instead of parsing the repodata files at each tab completion. This makes completing package names much snappier. This is an inspiration from zsh dnf completion: https://github.com/zsh-users/zsh/blob/zsh-5.8.1/Completion/Redhat/Command/_dnf#L7-L33 = changelog = msg: Use sqlite cache to make bash completion snappier type: enhancement resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1815895
Gentle bump :) |
I like the change in general. It provides less correct completions though. Also also we already have a PR with similar approach: #1100 |
I can send a changed version that bypasses the completion cache when |
I had not seen #1100 which is indeed the exact same thing. |
I did not find a way to detect if I have bypassed the completion cache for I am waiting for your feedback before proceeding. Thanks. |
I see yes you are correct. It doesn't take them into account either so doing the fallback wouldn't help much.
I also prefer faster feedback. Ok, thanks for the contributions! |
rpm-software-management#1817 added the ability to utilize sqlite cache when available. https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038 Are users noting that bash completion is slow without sqlite installed. = changelog = msg: [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora type: enhancement related: rpm-software-management#1817 related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
rpm-software-management#1817 added the ability to utilize sqlite cache when available. https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038 Are users noting that bash completion is slow without sqlite installed. = changelog = msg: [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora type: enhancement related: rpm-software-management#1817 related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
rpm-software-management#1817 added the ability to utilize sqlite cache when available. https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038 Are users noting that bash completion is slow without sqlite installed. = changelog = msg: [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora type: enhancement related: rpm-software-management#1817 related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
rpm-software-management#1817 added the ability to utilize sqlite cache when available. https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038 Are users noting that bash completion is slow without sqlite installed. = changelog = msg: [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora type: enhancement related: rpm-software-management#1817 related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
rpm-software-management#1817 added the ability to utilize sqlite cache when available. https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038 Are users noting that bash completion is slow without sqlite installed. = changelog = msg: [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora type: enhancement related: rpm-software-management#1817 related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
#1817 added the ability to utilize sqlite cache when available. https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 and https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038 Are users noting that bash completion is slow without sqlite installed. = changelog = msg: [spec] Add Recommends %{_bindir}/sqlite3 for bash-completion for Fedora type: enhancement related: #1817 related: https://discussion.fedoraproject.org/t/why-bash-auto-completion-is-so-slow-with-dnf/88944 related: https://discussion.fedoraproject.org/t/dnf-autocompletion-is-too-slow/64038
Use /var/cache/dnf/packages.db to make SQL requests instead of parsing the repodata files at each tab completion. This makes completing package names much snappier.
This is an inspiration from zsh dnf completion: https://github.com/zsh-users/zsh/blob/zsh-5.8.1/Completion/Redhat/Command/_dnf#L7-L33
= changelog =
msg: Use sqlite cache to make bash completion snappier
type: enhancement
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1815895