Skip to content

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.
@codspeed-hq
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%

@zanieb
Copy link
Member

zanieb commented Jul 22, 2025

I'm going to close this as it's quite stale now.

@zanieb zanieb closed this Jul 22, 2025
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

3 participants