Repository navigation
Skip marker DNF simplification for Boolean transformations - #22605
Closed
charliermarsh wants to merge 3 commits into
Closed
charliermarsh wants to merge 3 commits into
charliermarsh wants to merge 3 commits into
Conversation
charliermarsh
had a problem deploying
to
automations
October 15, 2026 19:33 — with
GitHub Actions
Failure
charliermarsh
marked this pull request as draft
October 15, 2026 19:35
charliermarsh
force-pushed
the
charlie/marker-dnf-bitsets
branch
from
October 15, 2026 19:37
e18c632 to
8454aaa
Compare
charliermarsh
force-pushed
the
charlie/marker-dnf-unsimplified
branch
from
October 15, 2026 19:37
c90f875 to
5c5ab16
Compare
charliermarsh
temporarily deployed
to
automations
October 15, 2026 19:39 — with
GitHub Actions
Inactive
Large groups of mutually exclusive extras can make `uv lock` slow, as in #21954. Add offline lock benchmarks for 4, 16, and 32 extras, using a shared dependency whose releases split resolution across Python versions. Each iteration starts without a lockfile and reuses a warm metadata cache, measuring a fresh solve through lockfile generation. Run the benchmarks in both CodSpeed modes.
Large conflict sets produce marker DNFs with many clauses. Simplification repeatedly compares their terms, including string and version values. Intern those terms and represent clauses as bit sets so we can compare integer IDs and machine words instead. Keep direct comparisons for small DNFs and use indexed term lookups for sparse clauses. Cap the dense bit-set index at 32 MiB and fall back to the linear algorithm for larger indexes or repeated terms within a clause. Terms and clauses are eliminated in the same order, so earlier removals affect later comparisons and serialized markers remain consistent. This reduces the cost of each comparison; DNF materialization and the quadratic number of clause comparisons remain. Related to #21954.
Resolving activated extras and checking marker reachability convert marker trees to DNF, simplify them, then reconstruct a Boolean result. Removing redundant terms and clauses does not change that result, so skip simplification and sorting in these two callers. Add `MarkerTree::to_unsimplified_dnf` for these transformations. Public marker output and conflict diagnostics continue to use simplified DNF, keeping marker text compact and avoiding repeated warnings from redundant expressions. Cover lockfile generation, locked revalidation, and export for an environment-dependent dependency shared by conflicting extras.
charliermarsh
force-pushed
the
charlie/marker-dnf-bitsets
branch
from
October 15, 2026 19:53
8454aaa to
b94d029
Compare
charliermarsh
force-pushed
the
charlie/marker-dnf-unsimplified
branch
from
October 15, 2026 19:53
5c5ab16 to
b5c3118
Compare
charliermarsh
temporarily deployed
to
automations
October 15, 2026 19:54 — with
GitHub Actions
Inactive
charliermarsh
force-pushed
the
charlie/marker-dnf-bitsets
branch
from
October 15, 2026 20:26
b94d029 to
b5bea7f
Compare
Merging this PR will improve performance by 5.07%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | git_fetch_cold_precise[sampleproject] |
37.6 ms | 35.8 ms | +5.07% |
| 🆕 | WallTime | uv_lock_no_lockfile_warm_metadata_cache_16_conflicting_extras |
N/A | 2.9 ms | N/A |
| 🆕 | WallTime | uv_lock_no_lockfile_warm_metadata_cache_32_conflicting_extras |
N/A | 14.1 ms | N/A |
| 🆕 | WallTime | uv_lock_no_lockfile_warm_metadata_cache_4_conflicting_extras |
N/A | 1.2 ms | N/A |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing charlie/marker-dnf-unsimplified (b5c3118) with charlie/marker-dnf-bitsets (b94d029)
Footnotes
-
54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #22608, which resolves extras and checks marker reachability directly on the decision diagram. The raw-DNF API is no longer needed. Lockfile and export regression coverage is retained in #22604 and #22606.