Skip to content

New resolver takes 1-2 hours to install a large requirements file #12314

@bdraco

Description

@bdraco

Description

This is a followup to #10788

Attached is a callgrind
pip_callgrind.zip

The bulk of the time is spent creating Version objects

Screenshot 2023-10-04 at 1 30 45 PM

Expected behavior

No response

pip version

pip 23.2.1 from /root/ztest/lib/python3.11/site-packages/pip (python 3.11)

Python version

3.11

OS

alpine 3.18 linux

How to Reproduce

Must use alpine 3.18 linux

python3 -m cProfile -o all.pstats -m pip install --no-cache-dir --only-binary=:all: --index-url https://wheels.home-assistant.io/musllinux-index/ -r /usr/src/homeassistant/requirements_all.txt

https://github.com/home-assistant/core/blob/dev/requirements_all.txt

or

Dockerfile https://github.com/home-assistant/core/blob/dev/Dockerfile

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: dependency resolutionAbout choosing which dependencies to installtype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions