Skip to content

Fix some performance regressions [5.5] #37801

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

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jun 5, 2021

Fixes rdar://78880553.

getParsedMembers() on imported and deserialized contexts has to pull
in all the members. This is wasteful. Imported contexts do not have
fingerprints at all, and fingerprints of deserialized contexts  are
serialized separately.

The fast path handles these cases, only calling down to
getParsedMembers() if the parent FileUnit is a SourceFile.
Check for the presence of a CustomAttr first, before calling into the
request evaluator.

Also clean up the logic a tiny bit.
@slavapestov slavapestov requested a review from a team as a code owner June 5, 2021 02:40
@slavapestov slavapestov requested a review from hborla June 5, 2021 04:14
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov changed the title Fix a couple of performance regressions [5.5] Fix some performance regressions [5.5] Jun 5, 2021
@slavapestov slavapestov merged commit df554fd into swiftlang:release/5.5 Jun 7, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants