Skip to content

use config (i.e. freeze) constraints also as solver version prefs #7491

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

Closed
wants to merge 2 commits into from

Conversation

gbaz
Copy link
Collaborator

@gbaz gbaz commented Jul 23, 2021

This extends version prefs handed to the solver (to guide it) by any version constraints fixed directly in a project config (or freeze) file. It cuts down the number of local backjumps, because the prefs are applied before directly traversing the version tree. This was done to see if it could improve the situation in #7466 but my tests don't seem to show a significant speedup -- i.e. local backjumps appear cheap, similar to #7490 .

So I'm not sure if there's any significant benefit in ensuring preferences are applied before running the solver and just letting the constraint conflict machinery immediately apply the fixed version constraints from the freeze file. Again interested in feedback from the Usual solver experts (@dcoutts @grayjay @ezyang and anyone else I may not have thought of here).

@grayjay
Copy link
Collaborator

grayjay commented Jul 27, 2021

As in #7490, I think that preferences shouldn't have a significant effect on performance if there are already constraints on the same choices, since the constraints should be enforced at the time that the choices are made. The solver also creates log messages about versions that were rejected by constraints by traversing those versions' nodes.

@gbaz
Copy link
Collaborator Author

gbaz commented Aug 12, 2021

As discussed here and on the appropriate tickets it seems like this doesn't really do something useful, so closing for now.

@gbaz gbaz closed this Aug 12, 2021
@fgaz
Copy link
Member

fgaz commented Aug 12, 2021

Do we leave the branch there?

@Mikolaj
Copy link
Member

Mikolaj commented Aug 12, 2021

IMHO the users may want to test if this one brings any improvements, if they still yearn for more or their scenario changes. But maybe I'm cargo-culting: gbaz==speed.

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

Successfully merging this pull request may close these issues.

4 participants