Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Optimize performance by filtering dependencies early #8295
Inspired by @Toflar’s #8275 this pull request tries to skip loading for packages that conflict with the root requirements. But after every loading loop iteration in the
This can be done because if all versions of a root dependency require the same package, this package can become a root dependency itself with a union of all version constraints. For example:
I tested the version of my pull request and the results look very promising I think:
As you can see in the last example: if the requirement is very unrestricted the benefits aren’t that great, but I think in many real world use cases this change could make a huge impact.
The concept is pretty much the same as #8275 but without the need for manually adding root requires or conflicts.
The state of this pull request is just a first draft, if you like the concept I would continue working on it: