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

pipenv lock: hangs when internet is slow. So is it ok to skip pipenv lock and do it once in a while when we have good internet speed #4260

Closed
sant527 opened this issue May 19, 2020 · 3 comments
Labels
Type: Question ❔ This is a question or a request for support.

Comments

@sant527
Copy link

sant527 commented May 19, 2020

Recently i observed that pipenv lock gets hanged.

I have read about the issue at many places

But practically i found on my pc that when its connected to slow internet speed (200-700 kbps) it stucks and when it is connected to good internet speed (2-3 Mbps) it works fine

Also i found that whenever ever i do pipenv lock it downloads 200-300 Mb data. Thats fine but just to know

So what i want to do is whenever i install a new package i want to skip the pipfile.lock getting updated using --skip-lock option

 i.e pipenv install --skip-lock somepackage

Later when i am connected to good internet speed i can do

pipenv lock

Locking [dev-packages] dependencies…
✔ Success! 
Locking [packages] dependencies…
✔ Success! 

I am just curious will this have any drawback in terms of identifying the versions installed at the time of installation

@benatkin
Copy link

benatkin commented May 26, 2020

This properly describes the issue here: #3827

It's much slower than just the speed it would take to download the amount of data that ends up getting downloaded, because there is a lot of back and forth to resolve the packages that need to be downloaded and generate pipenv.lock.

It's like SQL where you have 50 queries due to an N+1 query issue. If you're close to the database, it might not be noticeably slow, but once you're far away from the database, it's sloooooow.

@januszm
Copy link

januszm commented Feb 23, 2021

I generated a flamegraph of what happens inside the main function of the resolver.py, see: #3827 (comment)
on a poor internet connection pipenv install's bottleneck is downloading stuff

@matteius matteius added Type: Question ❔ This is a question or a request for support. and removed triage labels Jul 5, 2022
@matteius
Copy link
Member

matteius commented Jul 5, 2022

I think the answer to the OP is yes it should be fine to do this when your internet connection is having slowness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question ❔ This is a question or a request for support.
Projects
None yet
Development

No branches or pull requests

4 participants