Repository navigation
Conversation
sipsma
force-pushed
the
sipsma/dagql-batch-dependency-edges
branch
from
October 30, 2026 19:01
5e84d65 to
4e6b17e
Compare
…red set once Publishing a result whose value attaches many dependencies, such as a container with a mounted file per imported package, added each edge in its own egraph critical section and recomputed the parent's required session resources over all its deps after each one, quadratic in the number of deps. Add them all under one lock and recompute once. Signed-off-by: Erik Sipsma <[email protected]>
…s deps The attached-dependencies test only checked the required set's contents, which the per-edge recompute also got right. Check that publishing the result changes its required set once, not once per dep that has session resources. Signed-off-by: Erik Sipsma <[email protected]>
sipsma
force-pushed
the
sipsma/dagql-batch-dependency-edges
branch
from
October 30, 2026 20:53
4e6b17e to
3ec66ad
Compare
Contributor
Author
|
Folded unchanged into #15007, the engine performance batch; continuing there. |
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.
Publishing a result whose value attaches many dependencies was quadratic in their number. Each dependency edge took the egraph lock on its own and recomputed the parent's required session resources over every dependency added so far. A container with a mounted file per imported package, such as a Go link step with ~1,400 package archives from
withMountedFiles, pays that on every result built from it.This adds all of a result's edges under one lock and recomputes its required set once. Publication's attached dependencies,
PartHost.AddDependenciesand decoded dependencies on import all take the batched path. Edges, ownership counts and owned dependencies' install spans are unchanged. If any dependency was already collected, the whole batch is now refused before any edge is added.Measured, for one publish of a result with N plain dependencies:
On an edit build of dagger's CLI with a Go module that mounts each package archive, the edit of the CLI's own package was 0.16 s faster (95% interval −0.30 to −0.01 s, 12 interleaved runs per arm). The other builds' changes weren't distinguishable from noise.
The second commit makes the existing test fail without the change: the result's required set must change once, not once per dependency carrying a session resource.