[Yum-devel] [PATCH] Speedup provides "perl(*)" etc. by 40% ish. -- No need to check files.

seth vidal skvidal at fedoraproject.org
Wed Dec 15 17:44:22 UTC 2010


On Wed, 2010-12-15 at 12:30 -0500, James Antill wrote:
> ---
>  yum/__init__.py |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/yum/__init__.py b/yum/__init__.py
> index 1b36994..c5a0f67 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -2642,6 +2642,10 @@ class YumBase(depsolve.Depsolve):
>                  usedDepString = False
>                  where = self.rpmdb
>                  
> +                if not arg or arg[0] not in ('*', '?', '/'):
> +                    # Can't be a file/dir. so don't check those.
> +                    taglist = ['provides_names']
> +
>                  for po in where:
>                      searchlist = []
>                      tmpvalues = []

looks like a few lines up in

       taglist = ['filelist', 'dirnames', 'provides_names']
        for arg in args:
            if not misc.re_glob(arg):
                isglob = False   
                if arg[0] != '/':
                    canBeFile = False


we can use the same ('*', '?', '/') check, too.

ack
-sv




More information about the Yum-devel mailing list