-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Only call pip compile once #5905
Only call pip compile once #5905
Conversation
Thanks for digging into this, would be interesting to get some data on how this effects real-world workloads! |
@jurre I have just ran the change on a real-world project of ours. It has 3 .in/.txt combinations (ci, dev and prod). It has a total of 33 direct dependencies and ~150 indirect dependencies. When running the dry run for one dependency where there is a newer version available, these are the run times:
As you can see the improvement is quite significant. This is also because it has to run pip-compile for every .in/.txt combination. So you can imagine the total time profit if it's 2.5m faster for every dependency that has a newer version available (it always run this logic, even if the rules don't allow going to this new version, it only doesn't run it when the latest version available is your current version). In this case the update was not allowed, due to requirements, so the total time profit could be even bigger because it also runs pip-compile twice in the updater itself. |
Seems very promising, especially since we see just one test fail. Anything we can do to help from our end? |
I think my suggestion from #5903 (comment) should hopefully get things green! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome speed up! 🎉
fbc10f2
to
44a6dd7
Compare
python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on the discussion in #5903
44a6dd7
to
e138e24
Compare
…encies Also, update the comment about why we do this.
e138e24
to
fbdad5a
Compare
Thanks so much for this @jerbob92! 🎉 |
Avoid unnecessary
pip-compile
processes, and explain why we need to run an extra one sometimes.Closes #5903.