microsoft / component-detection

Scans your project to determine what components you use
MIT License
396 stars 81 forks source link

Investigate usage of `--use-feature=fast-deps` in `pip install --report` #1182

Open cobya opened 2 weeks ago

cobya commented 2 weeks ago

PEP 658 – Serve Distribution Metadata in the Simple Repository API was made available in May 2021 to help improve dependency resolution across the pip tooling by serving metadata information in a slimmer API. In v20 of the pip tooling, there was also the introduction of --use-feature=fast-deps to start making use of this information.

For our own tooling, we can investigate if there is any notable performance improvement in installation report generation across the large dependency trees component-detection tests on. However, based on https://github.com/pypa/pip/issues/8670 it is unlikely that there will be a noticeable increase in speed here until future improvements have been implemented.

The following PR https://github.com/pypa/pip/pull/12208 attempts to address some of these concerns and reports to have an estimated benchmark improvement of ~50% in dependency resolution time. However, it is still actively in development with the most recent commit on the branch in May 2024. Until it is merged it may not bring a benefit to run --use-feature=fast-deps.