Skip to content

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

@higumachan

Description

@higumachan
  • 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: e8ca4b3
poetry-core: f09d84a -> 86a0ec388eb7581c3c3b3d0f78848aa85f434893

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementationsstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions