Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
higumachan opened this issue Jul 28, 2023 · 2 comments
Open
2 tasks done
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@higumachan
Copy link

  • 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

@higumachan higumachan added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Jul 28, 2023
@higumachan higumachan changed the title Proportion of Time Spent on Cloning is Significant during poetry lock --no-update Proportion of Time Spent on Cloning is Significant during poetry lock --no-update Jul 28, 2023
@dimbleby
Copy link
Contributor

duplicate #7459

@dimbleby
Copy link
Contributor

I guess that whether a pull request is desirable or not will depend on what it looks like. Something that's obviously safe and a performance win is obviously wanted; something that trades performance for maintainability might not be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants