Skip to content

Conversation

@neonichu
Copy link
Collaborator

Internally to MacroValueAssignmentTable we were looking up interned location references to paths and back, even though we really only need to pass the reference to new MacroValueAssignment instances.

rdar://146340881

@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu
Copy link
Collaborator Author

Need to test whether this actually fixes the observed performance issues, but from code inspection this seems to be the primary culprit of going through the lock and also easily remedied.

Internally to `MacroValueAssignmentTable` we were looking up interned location references to paths and back, even though we really only need to pass the reference to new `MacroValueAssignment` instances.

rdar://146340881
@neonichu neonichu force-pushed the bbuegling/reduce-macroConfigPaths-lock-traffic branch from ded0c11 to 2cc96ff Compare October 22, 2025 17:51
@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu
Copy link
Collaborator Author

I haven't gotten to fully reproducing the reported perf issues, but I think it makes sense to merge this PR regardless. The changes should be correct and would reduce the call sites that require this lock significantly, so there's no need to hold the PR back on the determination whether that fully fixes the issue. I'll separately reproduce and open follow-up PRs if needed.

@neonichu neonichu merged commit 2cf2f6d into swiftlang:main Oct 31, 2025
49 checks passed
@neonichu neonichu deleted the bbuegling/reduce-macroConfigPaths-lock-traffic branch October 31, 2025 17:13
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