Skip to content

Enable static graph evaluation for cached restores - #10727

Draft
Jan Provazník (JanProvaznik) wants to merge 2 commits into
microsoft:mainfrom
JanProvaznik:dev/janprovaznik/restore-cache-benchmark
Draft

Enable static graph evaluation for cached restores#10727
Jan Provazník (JanProvaznik) wants to merge 2 commits into
microsoft:mainfrom
JanProvaznik:dev/janprovaznik/restore-cache-benchmark

Conversation

@JanProvaznik

@JanProvaznik Jan Provazník (JanProvaznik) commented Aug 25, 2026

Copy link
Copy Markdown

Change

Enable NuGet static-graph evaluation for both MSBuildCache graph invocations:

  • trusted main-branch cache seed
  • PR/main cache consumer

The existing /restore remains in place; this changes only NuGet's project discovery/evaluation path.

Measurement

The initial four-way experiment showed:

Variant Restore command
Regular restore 105.97s
Static-graph restore 98.95s

The whole .packages cache experiment was rejected because restoring its 7.8GB logical payload took 88–130 seconds. This draft now contains only the static-graph change. Five full PR pipeline runs will be collected before deciding whether to keep it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1
Copilot AI balanced review requested due to automatic review settings August 25, 2026 11:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Azure Pipelines benchmarks comparing four NuGet restore caching strategies.

Changes:

  • Adds package-cache warmup stage.
  • Benchmarks cache and static-graph combinations.
  • Publishes timing summaries, logs, and binlogs.
Suppressed comments (1)

azure-pipelines.yml:408

  • Keep this exact key run-specific in the same way as the warmup key. Otherwise it can select an older immutable entry whose package set does not reflect project/TFM changes, invalidating the intended warm-cache measurement.
        key: '"testfx-restore-benchmark" | "v1" | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | global.json | NuGet.config | Directory.Packages.props | eng/Versions.props | eng/Version.Details.xml'

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread azure-pipelines.yml Outdated
Comment thread azure-pipelines.yml Outdated
Comment thread azure-pipelines.yml Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 065e7e7f-9806-4543-a87b-9079876f2cc1
Copilot AI review requested due to automatic review settings August 25, 2026 14:10
@JanProvaznik Jan Provazník (JanProvaznik) changed the title Benchmark NuGet restore caching strategies Enable static graph evaluation for cached restores Aug 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

2 participants