Skip to content

Cache visible Clang modules for interface printing in ModuleDecl #74307

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
Jun 12, 2024

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jun 11, 2024

Instead of caching the collection of visible Clang modules in the TypePrinter, compute and cache them in the ModuleDecl. When printing a textual interface, the compiler will instantiate many new instances of TypePrinter, which means caching them there is not useful.

Instead of caching the collection of visible Clang modules in the 'TypePrinter', compute and cache them in the 'ModuleDecl'. When printing a textual interface, the compiler will instantiate many new instances of 'TypePrinter', which means caching them there is not useful.
@artemcm
Copy link
Contributor Author

artemcm commented Jun 11, 2024

@swift-ci test

Copy link
Contributor

@tshortli tshortli left a comment

Choose a reason for hiding this comment

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

It would be nice for this to use the request system, but that can be a separate improvement for another time. Thanks!

@artemcm artemcm merged commit 3dfeb5f into swiftlang:main Jun 12, 2024
5 checks passed
@artemcm artemcm deleted the CacheVisibleClangModulesInModules branch June 12, 2024 14:33
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