Open
Conversation
zanieb
reviewed
Mar 5, 2026
| /// Collect the workspace member projects from the `members` and `excludes` entries. | ||
| async fn collect_members( | ||
| /// Collect the workspace member projects and build the workspace object. | ||
| async fn build( |
Member
There was a problem hiding this comment.
I think I might still prefer "collect"? or just "new"? I think "build" is overloaded
Base automatically changed from
konsti/remove-project-discovery
to
konsti/workspace-refactorings
March 5, 2026 14:40
555d801 to
a17a664
Compare
This doesn't actually change workspace discovery (anymore), so we can error after discovery.
This will allow caching.
b5959c2 to
b9b1c55
Compare
After this change, we read each `pyproject.toml` exactly once for `uv run python` in airflow.
It's ~1.9x faster for `uv run python -V` in airflow (ignoring the one uncacheable wheel with `--offline`):
```
$ hyperfine "uv-branch run --offline python -V" "uv-main run --offline python -V" --warmup 3
Benchmark 1: uv-branch run --offline python -V
Time (mean ± σ): 84.3 ms ± 3.2 ms [User: 58.3 ms, System: 25.8 ms]
Range (min … max): 80.8 ms … 98.2 ms 34 runs
Benchmark 2: uv-main run --offline python -V
Time (mean ± σ): 166.4 ms ± 2.8 ms [User: 137.6 ms, System: 28.3 ms]
Range (min … max): 162.8 ms … 172.1 ms 17 runs
Summary
uv-branch run --offline python -V ran
1.97 ± 0.08 times faster than uv run --offline python -V
```
b9b1c55 to
bdab9cb
Compare
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.
This change avoids reading workspace root and member
pyproject.tomlmultiple times for the same information. It remove all duplicate reading except for cache keys.With the whole stack merged, it's ~1.9x faster for
uv run python -Vin airflow (ignoring the one uncacheable wheel with--offline):When analyzing the spans, reading the root
airflow/pyproject.tomlgoes from 130 times to 2 times (regular read and cache keys), while for each workspace member, it goes from 4 to 2 reads (regular read and cache keys), removing 2 full reads each.Before
After