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

fork every time we see a non-trivial marker ("aggressive" forking) #6143

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BurntSushi
Copy link
Member

@BurntSushi BurntSushi commented Aug 16, 2024

This PR is a revival of #5733 on top of current main, as many things
have changed since #5733.

It is suspected that, at least at this time, we probably don't
want to switch to aggressive forking, but we may in the future. In
particular, aggressive forking does fix #4668 and #6127.
Moreover, it fixes some issues that aren't filed but for which we only
have hand-crafted artificial examples (see the non-local-* packse
scenarios).

There are two main downsides to aggressive forking:

  1. It, well, creates a lot more forks. This leads to slower resolutions
    overall, sometimes dramatically so.
  2. It changes the resolutions/markers in ways we don't yet fully
    understand. Part of the point of this PR is to be able to look at the
    snapshot diffs to see the kinds of effects it has. In some cases, the
    changes are quite large and can be difficult to comprehend and reason
    about.

We haven't spent a ton of time on (1), but it is suspected that in the
aggressive strategy, there should still be a way to prune superfluous
forks.

This commit switches our forking strategy to one that always forks when
a marker expression is encountered, even if there is only one dependency
specification.

This results in a perf regression but it is believed, at present, to be
necessary for correctness and for stability in the lock file output.
Copy link

codspeed-hq bot commented Aug 16, 2024

CodSpeed Performance Report

Merging #6143 will degrade performances by 83.07%

Comparing ag/aggressive-forking (d4fd44a) with main (89efe24)

Summary

❌ 1 regressions
✅ 13 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main ag/aggressive-forking Change
resolve_warm_jupyter_universal 321.6 ms 1,899.6 ms -83.07%

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.

Python version limited requirement in universal locking
1 participant