Skip to content

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Aug 7, 2025

#83050 changed the behavior to query every Clang module identifier imported from Swift, even for modules which may have previously been discovered as transitive dependencies of another query. This means we now have a lot of results coming in from Clang scanner queries which are redundant, and we bridge them all, all of the time, which adds up to a substantial amount of time.

Instead of always bridging all of the discovered modules of all of the queries, only do so for modules which have not already been cached at the time we record query results.

@artemcm
Copy link
Contributor Author

artemcm commented Aug 7, 2025

@swift-ci smoke test

@artemcm artemcm force-pushed the NoRedundantClangDepBridging branch from f345188 to 4876b2f Compare August 7, 2025 22:28
@artemcm
Copy link
Contributor Author

artemcm commented Aug 7, 2025

@swift-ci smoke test

@artemcm artemcm force-pushed the NoRedundantClangDepBridging branch from 4876b2f to 8cf2714 Compare August 12, 2025 16:10
@artemcm
Copy link
Contributor Author

artemcm commented Aug 12, 2025

@swift-ci smoke test

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function wise it is all good. Just some comments about the APIs.

@artemcm
Copy link
Contributor Author

artemcm commented Aug 13, 2025

@swift-ci smoke test

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented Aug 13, 2025

@swift-ci smoke test

@artemcm
Copy link
Contributor Author

artemcm commented Aug 13, 2025

@swift-ci smoke test Linux platform

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly better. Still some comments about how functions are layered.

Instead of always bridging all of the discovered modules of all of the queries, only do so for modules which are not already cached
@artemcm artemcm force-pushed the NoRedundantClangDepBridging branch from 36ea30d to d228d30 Compare August 15, 2025 22:27
@artemcm
Copy link
Contributor Author

artemcm commented Aug 15, 2025

@swift-ci smoke test

…leDependencyScanner' utility

This moves the functionality of 'bridgeClangModuleDependency' into a utility in the main scanner class because it relies on various objects whose lifetime is already tied to the scanner itself.
@artemcm artemcm force-pushed the NoRedundantClangDepBridging branch from d228d30 to 9f0083c Compare August 15, 2025 22:40
@artemcm
Copy link
Contributor Author

artemcm commented Aug 15, 2025

@swift-ci smoke test

@artemcm artemcm merged commit 89b43dc into swiftlang:main Aug 18, 2025
3 checks passed
@artemcm artemcm deleted the NoRedundantClangDepBridging branch August 18, 2025 16: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