Skip to content

Improve builds speed#320214

Draft
alexdima wants to merge 6 commits into
mainfrom
agents/build-performance-analysis-az-downloads
Draft

Improve builds speed#320214
alexdima wants to merge 6 commits into
mainfrom
agents/build-performance-analysis-az-downloads

Conversation

@alexdima
Copy link
Copy Markdown
Member

@alexdima alexdima commented Jun 6, 2026

Before After
build 445464 build 445473
image image

  1. delete unused .yml files
  2. remove unnecessary emsdk setup
  3. use a stable cache key to allow for build caches to hit
    https://dev.azure.com/monacotools/Monaco/_build/results?buildId=445464&view=logs&j=61096ea8-10fd-584b-0f03-7b170d825b33&t=0f0ef666-d134-41bd-bd0c-cf8b2aa3f08f&l=15
  4. reuse the same patterns to store/restore node_modules as regular vscode
    https://dev.azure.com/monacotools/Monaco/_build/results?buildId=445470&view=results
  5. save 20s by minifying only .json files in the root (avoids simulation output and other test outputs/fixtures)
    https://dev.azure.com/monacotools/Monaco/_build/results?buildId=445470&view=logs&j=61096ea8-10fd-584b-0f03-7b170d825b33&t=0891a748-3441-50a4-3e8b-7656cdf5b56b
  6. upload the copilot vsix before running the copilot tests, this unblocks all other stages that were waiting on it
    https://dev.azure.com/monacotools/Monaco/_build/results?buildId=445473&view=results

Main problems

A. Our Copilot stage was never seeing cache hits e.g.:

##[warning]The given cache key has changed in its resolved value between restore and save steps;
original key: "copilot_build_cache"|n/5xO/gDLWmZP+QQ2uqyTdcsJMwtqurLbQsBTLZa1Zk=|F63S4oMklbJm5DX9SF/yoCjywaM8LiWaBw46dhFrYVk=|y1ia3F6tmEobxRM+AnIUe9mmgc5Az0MAAgVNj3rdWQY=
modified key: "copilot_build_cache"|n/5xO/gDLWmZP+QQ2uqyTdcsJMwtqurLbQsBTLZa1Zk=|F63S4oMklbJm5DX9SF/yoCjywaM8LiWaBw46dhFrYVk=|mbSzeozwjirWVhtb7Q/HgGFfwesSkvbMXK7iA3uJnb4=

B. Our stages were waiting sometimes for 8-9 minutes for the copilot vsix in the "Download Copilot VSIX" stage.


In detail

  • I found some unused builds [1]
  • We're now consuming built wasm, so emsdk is no longer necessary [2]
  • I made the cache key stable [3]
  • Once I made the cache key stable, I noticed failures caused by the incomplete store/restore [4]
  • I noticed that we minify hundreds of json files that we don't ship [5]
  • I noticed that the other stages were still just busy-polling wasting minutes waiting for the copilot vsix, so we now publish the vsix before the tests [6]

Copilot AI review requested due to automatic review settings June 6, 2026 08:55
@alexdima alexdima self-assigned this Jun 6, 2026
@alexdima alexdima changed the title Improve Build Speed Improve builds speed Jun 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR targets faster Copilot extension CI builds by removing the emsdk setup path, deleting legacy Azure Pipeline YAMLs in the extension, and switching the Copilot build cache to a stable, computed cache key.

Changes:

  • Remove emsdk setup usage by deleting extensions/copilot/build/setup-emsdk.sh.
  • Delete legacy Copilot extension Azure Pipelines (extensions/copilot/build/release.yml, extensions/copilot/build/pre-release.yml).
  • Update Copilot pipeline setup to use a computed cache key (.build/packagelockhash) and extend the shared cache-key computation to include a Copilot-specific cachesalt.
Show a summary per file
File Description
extensions/copilot/build/setup-emsdk.sh Deleted emsdk bootstrap script previously used to install/activate emscripten.
extensions/copilot/build/release.yml Deleted legacy Azure Pipeline definition for stable release.
extensions/copilot/build/pre-release.yml Deleted legacy Azure Pipeline definition for scheduled pre-release.
build/azure-pipelines/copilot/setup-steps.yml Switch Copilot build cache key to a computed hash file; remove emsdk setup steps.
build/azure-pipelines/common/computeNodeModulesCacheKey.ts Include Copilot extension .cachesalt in the computed key inputs.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 2

Comment thread build/azure-pipelines/copilot/setup-steps.yml
Comment thread build/azure-pipelines/common/computeNodeModulesCacheKey.ts
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