Skip to content

Improve speed of pip list --outdated via parallelization #7964

@CrafterKolyan

Description

@CrafterKolyan

Environment

  • pip version: 20.0.2
  • Python version: 3.6.9
  • OS: Any

Description
pip list --outdated works slow in case of many packages. Currently 50% of real time is wasted on requests result waiting. (real time is much higher than user time)

Expected behavior
pip list --outdated sends queries in parallel (real time is almost equal to user time)

How to Reproduce
Linux/Mac OS X:

python3 -m venv venv
source venv/bin/activate
pip install -U setuptools
pip install -U pip
pip install numpy scipy pandas matplotlib seaborn statsmodels sklearn jupyter tqdm requests six catalyst PyQt5
time python3 -m pip list --outdated
deactivate
rm -rf venv

Watch on time output.

Windows 10 (not good reproduction):
In Powershell (not cmd):

python -m venv venv
.\venv\Scripts\activate.bat
pip install -U setuptools
python -m pip install -U pip
pip install numpy scipy pandas matplotlib seaborn statsmodels sklearn jupyter tqdm requests six catalyst PyQt5
(Measure-Command {pip list --outdated}).TotalSeconds
.\venv\Scripts\deactivate.bat
Remove-Item -path venv -recurse

Watch Measure-Command output.
Or use Windows Linux Subsystem to reproduce this.

Output
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions