Skip to content

Conversation

@rconnell9
Copy link
Contributor

@rconnell9 rconnell9 commented Nov 17, 2025

Avoid expensive string array operations when performing target source evaluation.

Local timings for target source evaluation of protoc before and after:

Before: 'swift-protobuf': TargetSourcesBuilder.run() for target 'protoc' took 11.544s
After: 'swift-protobuf': TargetSourcesBuilder.run() for target 'protoc' took 0.190s

CPU cycles for full build of swift-protobuf:
Before: 33.43 G
After: 5.72 G

Motivation:

Fixes: #9304

…ces causes a performance degradation in TargetSourcesBuilder
@rconnell9
Copy link
Contributor Author

@swift-ci test

@rconnell9
Copy link
Contributor Author

@swift-ci test windows

@bripeticca
Copy link
Contributor

@swift-ci please test windows

@rconnell9
Copy link
Contributor Author

@swift-ci test windows self hosted

1 similar comment
@rconnell9
Copy link
Contributor Author

@swift-ci test windows self hosted

@bkhouri
Copy link
Contributor

bkhouri commented Nov 17, 2025

@swift-ci test self hosted windows

@rconnell9 rconnell9 merged commit 394b430 into swiftlang:main Nov 18, 2025
7 checks passed
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.

Explicit source file declaration in Target's sources causes a performance degradation in TargetSourcesBuilder

5 participants