python-poetry / python-poetry/poetry

Proportion of Time Spent on Cloning is Significant during `poetry lock --no-update`

Open
#8,250 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

Title: Proportion of Time Spent on Cloning is Significant during poetry lock --no-update

Body:

While running Poetry and cProfile locally, I noticed that a significant amount of time is spent on the cloning process, as depicted in the image below.

image

I made some modifications to replace the clone operation with a shallow copy, copying only necessary attributes. (I adjusted it to pass the tests by defining "necessary attributes".)

As a result, I was able to significantly reduce the time spent on the cloning operation, as can be seen in the following image. In addition, the processing time also improved significantly:

image

From

Resolving dependencies... (58.9s)

to

Resolving dependencies... (34.5s)

Would you be interested in this improvement? If so, I would like to create a PR right away.

environment

poetry: e8ca4b32ceeb1648eaba6bed49e8b36dcfbf0cc0
poetry-core: f09d84a4c6ad6d1117998ff9d46949e1bd819f5b -> 86a0ec388eb7581c3c3b3d0f78848aa85f434893

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by profiling poetry lock --no-update with cProfile and confirm how much time the cloning process consumes. Review the existing clone behavior and tests to determine which attributes are necessary, then verify that the tests still pass and that dependency resolution shows a measurable improvement.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.