Skip to content

[SR-13823] Slow compilation involving big C structs #56221

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

Closed
swift-ci opened this issue Nov 3, 2020 · 7 comments
Closed

[SR-13823] Slow compilation involving big C structs #56221

swift-ci opened this issue Nov 3, 2020 · 7 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself performance

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Nov 3, 2020

Previous ID SR-13823
Radar rdar://problem/71040556
Original Reporter cuscus (JIRA User)
Type Bug

Attachment: Download

Environment

MacBook Air

macOS 11.0.1

Xcode 12.2

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 08dc0adbec0bf0907d4e82e5325c12f4

Issue Description:

Problems described in this post on Swift Forums

@typesanitizer
Copy link

@swift-ci create

@rjmccall
Copy link
Contributor

Can you attach a test case, or anything we can use to reproduce this at all?

@swift-ci
Copy link
Contributor Author

Comment by Cuscus (JIRA)

Hi, I'm upgrading my machine, will try to reproduce the problem in a test case and upload it as soon as I can.

@swift-ci
Copy link
Contributor Author

Comment by Cuscus (JIRA)

I managed to reproduce the bug in a small test case, please check the readme for what is what, where, and so on. This is now on macOS 11.0.1, Xcode 12.2. Let me know if there is a problem.

@rjmccall
Copy link
Contributor

Thank you. Seems to be a scaling problem in the definitive-initialization logic; we'll see what we can do. It's related to the large number of subobjects, probably mostly because of the arrays.

The only workaround I can see is to avoid making local variables of these types. As you can see, we don't have a problem simply compiling values of the type as e.g. return values and parameters, although I'm sure there are inefficiencies we could still chase out.

@swift-ci
Copy link
Contributor Author

Comment by Cuscus (JIRA)

Okay, I see, thanks for the explanation and suggestion. I'll just poke around to avoid this issue for the time being, most of the code is still temporary, just for testing purposes.

@eeckstein
Copy link
Contributor

Will be fixed with #79186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself performance
Projects
None yet
Development

No branches or pull requests

5 participants