Skip to content

[clang][cas] Avoid calling freezeConfig for every cache key #9831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

benlangmuir
Copy link

  • Explanation: With the libclang caching APIs, it is possible to configure CASOptions separately from the CAS used for scanning. In this setup, the CAS is not pre-cached in the CASOptions and ends up being re-opened for every cache key, which is expensive with some plugin CAS. Instead, get the hash identifier from the already open CAS and only freezeConfig when canonicalizing for an actual compilation.
  • Scope: Affects caching builds.
  • Issue/Radar: rdar://141555438
  • Original PR: [clang][cas] Avoid calling freezeConfig for every cache key #9803
  • Risk: Low. Should not change behaviour, only performance. Only affects caching builds.
  • Testing: Existing regression tests pass.
  • Reviewer: @akyrtzi

With the libclang caching APIs, it is possible to configure CASOptions
separately from the CAS used for scanning. In this setup, the CAS is not
pre-cached in the CASOptions and ends up being re-opened for every cache
key, which is expensive with some plugin CAS. Instead, get the hash
identifier from the already open CAS and only freezeConfig when
canonicalizing for an actual compilation.

rdar://141555438
(cherry picked from commit 3c460cc)
@benlangmuir benlangmuir requested a review from a team as a code owner January 14, 2025 19:59
@benlangmuir
Copy link
Author

@swift-ci please test

@fredriss fredriss merged commit 1e19c09 into swiftlang:swift/release/6.1 Jan 15, 2025
3 checks passed
@benlangmuir benlangmuir deleted the freeze-less-61 branch January 15, 2025 17:36
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