{{ message }}
Repository navigation
Optimize Temurin tool-cache fast path with lazy loading - #1179
Merged
brunoborges merged 4 commits intoJul 29, 2026
Merged
Conversation
- Lazy-load distribution installers so only the selected distro module is initialized - Defer cache feature/cache module loading until cache input is provided - Start cache restore early and await it safely alongside Java setup flow - Update orchestration and lazy-loading tests; regenerate dist artifacts Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc2c0256-c55e-4a35-a584-5bed7e8b11ad
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes the common Temurin tool-cache-hit path by reducing eager module initialization and introducing concurrency between dependency cache restoration and local Java setup, while preserving deterministic failure behavior. It also regenerates the bundled dist/ output to support dynamic imports/code-splitting and updates tests to validate lazy loading and true overlap.
Changes:
- Make distribution selection lazy by converting the distribution factory to async and dynamically importing only the selected installer.
- Start dependency cache restoration earlier (only when
cacheis configured) and await it before exit while keeping Java/setup errors deterministic. - Add/update unit tests for async distribution resolution, conditional module loading, and concurrent orchestration; regenerate
dist/and update the release staging script.
Show a summary per file
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 13/35 changed files
- Comments generated: 2
- Review effort level: Low
- Lazy-load cache save in cleanup path so no-cache runs avoid cache module init in post action - Stage dist/setup/package.json in release script for chunked setup bundle completeness Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc2c0256-c55e-4a35-a584-5bed7e8b11ad
Patch is-unsafe's XML comment-close detector during builds so generated bundles recognize both HTML comment end forms and satisfy CodeQL until the dependency publishes a fix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 277302b1-aa95-4012-817b-9752cdaee14e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cc2c0256-c55e-4a35-a584-5bed7e8b11ad
brunoborges
deleted the
brunoborges-optimize-temurin-tool-cache-fast-path
branch
July 29, 2026 21:53
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.

Description:
This change optimizes the high-volume Temurin tool-cache-hit path by reducing eager startup work and overlapping dependency cache restore with local setup work. It does this by lazy-loading only the selected distribution installer, loading cache dependencies only when
cacheis configured, and starting restore early while still awaiting completion before action exit.To preserve behavior and failure semantics, the setup flow now keeps Java/setup failures deterministic while still awaiting any in-flight cache restore to avoid unhandled promise rejections. Tests were updated to cover async distribution resolution, conditional module loading, and true concurrency in orchestration.
The setup bundle was regenerated after introducing dynamic imports. Because the setup output is now chunked, the release staging script was updated to include
dist/setup/*.js.Related issue:
Fixes: #1177
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.