Repository navigation
[Caching] Skip cache key computation for unbatched compile jobs - #2227
Merged
Merged
Conversation
`compileJob` ignored its `produceCacheKey` parameter and always computed output cache keys. In batch mode, the per-file compile jobs are later re-formed into batch jobs that compute their own keys, so the keys for the unbatched jobs were wasted work. With incremental builds, the jobs for skipped files are never batched, so every build computed and stored a cache key for every file in the module. Honor `produceCacheKey` so only the jobs that will run get cache keys. rdar://188865845
cachemeifyoucan
requested review from
DougGregor,
artemcm,
compnerd and
owenv
as code owners
October 7, 2026 16:40
artemcm
approved these changes
Oct 7, 2026
Contributor
Author
|
@swift-ci please test |
cachemeifyoucan
enabled auto-merge
October 7, 2026 17:06
Contributor
Author
|
@swift-ci please test windows platform |
1 similar comment
Contributor
Author
|
@swift-ci please test windows platform |
The test doesn't need the stdlib or the SDK. Build with -parse-stdlib to make it run much faster.
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please test windows platform |
This was referenced Oct 8, 2026
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.
compileJobignored itsproduceCacheKeyparameter and always computedoutput cache keys. In batch mode, the per-file compile jobs are later
re-formed into batch jobs that compute their own keys, so the keys for
the unbatched jobs were wasted work. With incremental builds, the jobs
for skipped files are never batched, so every build computed and stored
a cache key for every file in the module.
Honor
produceCacheKeyso only the jobs that will run get cache keys.rdar://188865845