Bug 811285 - Tab Completion Slower in Fedora than Ubuntu using CLI Package Manager
Summary: Tab Completion Slower in Fedora than Ubuntu using CLI Package Manager
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-10 15:52 UTC by Matt Reid
Modified: 2014-01-21 23:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 919852 (view as bug list)
Environment:
Last Closed: 2013-02-13 20:50:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
A little test script to show the concept (222 bytes, text/x-python)
2012-04-13 09:09 UTC, Tim Lauridsen
no flags Details

Description Matt Reid 2012-04-10 15:52:38 UTC
Description of problem:
Not sure why this is the case, but coming from Ubuntu I've always felt that the tab completion while using yum was slower than what I was used to with apt-get in Ubuntu. I just installed two fresh vms of F16 and 11.10 and compared auto-completing similar commands and it is the case that Fedora is slower. 

In Ubuntu getting a list of packages happens immediately (as I press tab a second time), while in Fedora there's hesitation, sometimes to the point that I feel compelled to double tap again, in case it missed my command.

Not sure if this is a bash-completion thing or a difference between yum and apt, but I figured I'd note it in a BZ, as I wish it was more responsive in Fedora.

Version-Release number of selected component (if applicable):
Fedora - bash-completion-1.3-6.fc16.noarch
Ubuntu - bash-completion-1:1.3-1ubuntu6

How reproducible:
Always

Steps to Reproduce:
1. In Ubuntu vm, type sudo apt-get install libre (tap tab twice), see "Display all 246 possibilities? (y or n)"
2. In Fedora vm, type yum install libre (tap tab twice), see "Display all 128 possibilities? (y or n)"
  
Actual results:
Ubuntu figures out what's available and gives feedback faster than Fedora

Expected results:
That Fedora tab completion is as fast as Ubuntu

Additional info:
This is noticeable on misses as well, Fedora has to think for a bit to determine that you're trying to tab complete something that doesn't exist, and you lose the ability to interact with the terminal until it finishes, whereas it doesn't seem like Ubuntu has that extra processing time and if it fails, you can alter your string immediately after the attempt, instead of waiting for a second or two. For the purposes of this comparison, I typed in random characters, but I do run into this once in awhile in Fedora.

Slight completion hesitation is noticeable in smaller cases as well, when it just needs to complete the package you're typing and not try to show you hundreds of packages as in my examples above.

Happy to provide any additional info, if more detail is helpful. Again, not sure where the difference lies, maybe its the data that bash-completion is fed, and not bash-completion itself.

Comment 1 Ville Skyttä 2012-04-11 14:27:24 UTC
It's not about bash-completion, it's about yum vs apt-get.

To get a rough picture of it, check out "yum -C list available" vs the corresponding apt-get (or is it apt-cache? don't remember offhand) command.

Comment 2 Tim Lauridsen 2012-04-13 08:01:36 UTC
@Matt:
comparing bash-completion speed with another distro don't make much sense.
But I agree that the bash completion with yum install foo<tab><tab> is very slow
and could be optimized.

@Ville:

If you use a helper python script, you would be able to speed it up

Check how I do it in yumex where I have realtime package lookup when you type

https://github.com/timlau/yumex/blob/master/src/yumexbackend/yum_server.py#L1046

parsing the output from "yum -C list available" will be slow because of the number of packages in Fedora and you have to list all packages every time and filter them.

if you let yum do the searching using returnPackages(patterns=['foo*']) it will speed up thing a lot and you can use YumBase.rpmdb.returnPackages on remove commands and YumBase.pkgsack.returnPackages on install/update commands.

Comment 3 Tim Lauridsen 2012-04-13 09:09:21 UTC
Created attachment 577275 [details]
A little test script to show the concept

Comment 4 Ville Skyttä 2012-04-13 14:09:12 UTC
We're already using a dedicated script for that, see /usr/share/yum-cli/completion-helper.py - "yum -C list available" was just an easily accessible example and I mentioned "rough picture" with it...

Comment 5 Fedora Admin XMLRPC Client 2012-04-27 15:27:52 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora End Of Life 2013-01-16 16:48:44 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Fedora End Of Life 2013-02-13 20:50:20 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.