Skip to content

Conversation

@neonichu
Copy link
Collaborator

We were still going through the lock once for every MacroValueAssignment which was causing performance issues during config file parsing. This didn't really make sense since we can instead do the insert in MacroConfigFileParser and otherwise only deal in index references. Real locations only need to be materialized for code that deals with them.

rdar://164650188

@neonichu
Copy link
Collaborator Author

@swift-ci please test

We were still going through the lock once for every `MacroValueAssignment` which was causing performance issues during config file parsing. This didn't really make sense since we can instead do the insert in `MacroConfigFileParser` and otherwise only deal in index references. Real locations only need to be materialized for code that deals with them.

rdar://164650188
@neonichu neonichu force-pushed the bbuegling/164650188 branch from ae0f300 to e38b96e Compare November 13, 2025 23:17
@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu
Copy link
Collaborator Author

[2025-11-13T23:59:21.510Z] error: link command failed with exit code 1 (use -v to see invocation)
[2025-11-13T23:59:21.510Z] Undefined symbols for architecture x86_64:
[2025-11-13T23:59:21.510Z]   "SWBMacro.MacroValueAssignmentTable.push(_: SWBMacro.MacroDeclaration, _: SWBMacro.MacroExpression, conditions: SWBMacro.MacroConditionSet?, location: SWBMacro.MacroValueAssignmentLocation?) -> ()", referenced from:
[2025-11-13T23:59:21.510Z]       SWBTaskExecutionTests.(InfoPlistProcessorTaskTests in _209D8BDE03DFAB9F18A5B24C981ACA40).createMockScope(debugDescription: Swift.String, _: ((SWBMacro.MacroNamespace, inout SWBMacro.MacroValueAssignmentTable) throws -> ())?) throws -> SWBMacro.MacroEvaluationScope in InfoPlistProcessorTaskTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #4 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #7 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #7 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #10 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #10 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #13 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       closure #13 (inout SWBMacro.MacroValueAssignmentTable, SWBMacro.MacroNamespace) -> () in SWBTaskExecutionTests.(ProcessProductEntitlementsTaskActionTests in _E146C596D52A1F96CFC7E16CF2109017).performTaskAction() async throws -> () in ProcessProductEntitlementsTaskActionTests.swift.o
[2025-11-13T23:59:21.510Z]       ...
[2025-11-13T23:59:21.510Z] ld: symbol(s) not found for architecture x86_64

🤔

@neonichu
Copy link
Collaborator Author

@swift-ci please test macOS

@neonichu neonichu merged commit 22b2f57 into swiftlang:main Nov 14, 2025
117 of 119 checks passed
@neonichu neonichu deleted the bbuegling/164650188 branch November 14, 2025 17:47
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.

3 participants