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

Faster package querying #5000

Closed

Conversation

and3rson
Copy link

@and3rson and3rson commented Jul 6, 2017

During the docker-py distribution check, pip freeze can be terribly slow if you have a lot of packages installed. Here's my case:

$ time pip freeze > /dev/null
real    0m3,930s
user    0m3,787s
 sys     0m0,093s

$ pip freeze | wc -l
173

$ time docker-compose 2> /dev/null
real    0m3,443s
user    0m3,277s
sys     0m0,143s

After this fix it becomes more than 3x faster:

$ time docker-compose 2> /dev/null 
real    0m0,935s
user    0m0,827s
sys     0m0,100s

This feature was tested in Python 2.7 & 3.6.

and3rson added 2 commits July 6, 2017 13:19
Signed-off-by: Andrew Dunai <andunai@gmail.com>
Signed-off-by: Andrew Dunai <andunai@gmail.com>
@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "feature/faster-package-querying" git@github.com:and3rson/compose.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354498736
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Signed-off-by: Andrew Dunai <andunai@gmail.com>
@and3rson and3rson force-pushed the feature/faster-package-querying branch from 08fb8f1 to e6dd9a6 Compare July 6, 2017 10:53
@and3rson and3rson force-pushed the feature/faster-package-querying branch from e8a41a8 to 497b189 Compare July 6, 2017 11:22
@and3rson and3rson force-pushed the feature/faster-package-querying branch from 497b189 to edfe6eb Compare July 6, 2017 11:24
@and3rson and3rson force-pushed the feature/faster-package-querying branch from e066834 to 3d2abc5 Compare July 6, 2017 11:29
@and3rson and3rson force-pushed the feature/faster-package-querying branch from 3d2abc5 to 7795e1d Compare July 6, 2017 11:30
@and3rson and3rson force-pushed the feature/faster-package-querying branch from 7795e1d to e08040e Compare July 6, 2017 11:41
@and3rson and3rson force-pushed the feature/faster-package-querying branch from e08040e to c7847a0 Compare July 6, 2017 11:41
Signed-off-by: Andrew Dunai <andunai@gmail.com>
@and3rson and3rson force-pushed the feature/faster-package-querying branch from c7847a0 to ad1ae93 Compare July 6, 2017 11:42
@and3rson
Copy link
Author

and3rson commented Jul 6, 2017

The Jenkins build seems to be hanging... Is it normal?

@shin- shin- closed this Jul 7, 2017
@shin-
Copy link

shin- commented Jul 7, 2017

#4920 (comment)

@shin-
Copy link

shin- commented Jul 7, 2017

This part of the code has been iterated over many times. The current solution is the one that offers the best compromise for every declination of the software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants