Skip to content

ci: improve version module performance - #10801

Closed
jedevc wants to merge 2 commits into
dagger:mainfrom
jedevc:improve-version-perf
Closed

jedevc wants to merge 2 commits into
dagger:mainfrom
jedevc:improve-version-perf

Conversation

@jedevc

@jedevc jedevc commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Before:

$ time dagger call -m github.com/dagger/dagger/version@main version
v0.18.15-250728111339-1a8c04db77d6

Full trace at https://dagger.cloud/jedevc/traces/fa964659c3e20b2df74c3b43590d70ab
dagger-dev call -m github.com/dagger/dagger/version@main version  3.44s user 0.88s system 4% cpu 1:37.37 total

$ time dagger call -m github.com/dagger/dagger/version@main version
v0.18.15-250728111339-1a8c04db77d6

Full trace at https://dagger.cloud/jedevc/traces/8276c6e06d137a4fd0b665f431100f4e
dagger-dev call -m github.com/dagger/dagger/version@main version  0.75s user 0.21s system 9% cpu 10.175 total

After:

$ time dagger call -m github.com/jedevc/dagger/version@improve-version-perf version
v0.18.15-250728150307-c367a1eb271b

Full trace at https://dagger.cloud/jedevc/traces/45d5694213e5a322564c55867b766afd
dagger-dev call -m github.com/jedevc/dagger/version@improve-version-perf   3.42s user 0.79s system 4% cpu 1:36.15 total

$ time dagger call -m github.com/jedevc/dagger/version@improve-version-perf version
v0.18.15-250728150307-c367a1eb271b

Full trace at https://dagger.cloud/jedevc/traces/daa306ed18f07de4e1f3504f0273a439
dagger-dev call -m github.com/jedevc/dagger/version@improve-version-perf   0.44s user 0.12s system 10% cpu 5.276 total

The uncached performance is pretty much identical (we're still having to do all the same work), but the cache performance is twice as fast (from ~10s to ~5s) - we no longer need to pull the whole repo everytime.

Uncached Total Time Cached Total Time
Before 97.37s 10.175s
After 96.15 5.276s

@jedevc
jedevc requested a review from sipsma July 28, 2025 14:25
@jedevc
jedevc marked this pull request as draft July 28, 2025 16:25
@jedevc

jedevc commented Jul 28, 2025

Copy link
Copy Markdown
Contributor Author

😢 will fix ci errors tomorrow 😢

@jedevc jedevc linked an issue Jul 30, 2025 that may be closed by this pull request
@jedevc

jedevc commented Jul 31, 2025

Copy link
Copy Markdown
Contributor Author

😠 hm, yeah, this is failing because merge-base can't run without a full history. This is kind of frustrating - because the default depth of the .git directory is 1.

I think we still need some git api changes - will brainstorm some. I think we want something like #10200.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@jedevc
jedevc force-pushed the improve-version-perf branch 2 times, most recently from 1aafb76 to 5149bd7 Compare August 26, 2025 16:04
Kinda sad, but we need this until we get proper contextual git.

Signed-off-by: Justin Chadwell <[email protected]>
@jedevc
jedevc force-pushed the improve-version-perf branch from 5149bd7 to 661f4b3 Compare August 26, 2025 16:09
@jedevc
jedevc marked this pull request as ready for review August 26, 2025 16:09
@jedevc
jedevc marked this pull request as draft August 27, 2025 10:22
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants