Skip to content

Conversation

augusto2112
Copy link
Contributor

Currently, when we have a cache miss on the typeref cache, we parse all the metadata that we know of, before querying the cache again. Change this to query for the typeref after parsing every reflection info. This will be especially useful for LLDB, as it uses a client server model, and parsing metadata may involve going through a (potentially slow network).

This PR also has an added benefit of not re-parsing metadata that was already parsed before, if, for example, a new image is loaded in between different typeref queries.

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

Copy link
Contributor

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

This looks like a nice performance win when debugging apps with dynamic libraries.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does FirstUnprocessedReflectionInfoIndex convey the intention better?

Copy link
Contributor

Choose a reason for hiding this comment

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

///

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@augusto2112 augusto2112 merged commit 981c358 into swiftlang:main Dec 7, 2021
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