-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Use cached record when possible. #34869
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
[cxx-interop] Use cached record when possible. #34869
Conversation
Hopefully, the comments clearly present the issue, but just in case, here is what happens without this patch:
|
@hlopko friendly ping. |
@swift-ci please smoke test. |
@swift-ci please test OS X platform. |
@swift-ci please test Windows. |
It seems like smoke test is only triggering Linux recently? |
@swift-ci please test Windows. |
Build failed |
(Unrelated async issues on 32 bits... retrying.) |
@swift-ci please smoke test Linux. |
@swift-ci please smoke test OS X. |
@hlopko friendly ping. |
@hlopko this patch is actually deceivingly small. It's mostly just a NFC that moves things around. If it would be easier for you to review it if I broke out the non-functional part, I'm happy to do that. |
37c8457
to
79e4995
Compare
@hlopko another friendly ping :) |
It is not completely uncommon for a record to get imported while importing it's members (for example, if the member points back to the parent record). In this case, simply use the already-imported record. This should improve performance but also prevent an error where a member accidentally had two parents. This patch also moves around some of the member import/add logic to allow for the above "optimization."
79e4995
to
ecd1018
Compare
@gribozavr thanks for the comments! I've addressed all the inline comments (and added some formatting changes). Let me know what you think :) |
@swift-ci please smoke test. |
@swift-ci please smoke test Linux. |
It is not completely uncommon for a record to get imported while importing its members (for example, if the member points back to the parent record). In this case, simply use the already-imported record. This should improve performance but also prevent an error where a member accidentally had two parents.
This patch also moves around some of the member import/add logic to allow for the above "optimization."