Skip to content
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

[SR-10249] Compile Time Regression in Swift 5 #52649

Open
adellibovi opened this issue Mar 31, 2019 · 5 comments
Open

[SR-10249] Compile Time Regression in Swift 5 #52649

adellibovi opened this issue Mar 31, 2019 · 5 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@adellibovi
Copy link
Contributor

Previous ID SR-10249
Radar None
Original Reporter @adellibovi
Type Bug

Attachment: Download

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

md5: 680354d90f7a6aa33af9edacf3e4a3c0

Issue Description:

Hi,
I noticed a regression with Xcode 10.2 and Swift 5 when compiling.
I was able to reproduce it with a small demo example that you can find attached.
With Xcode 10.1 + Swift 4.2 it compiles under 20 seconds
With Xcode 10.2 + Swift 5 it goes up to 4 minutes (+1200% of slowing down).

It looks like the compiler is spending most of the time on VerifierLegacyPass and visitGlobalValue (attached also a screenshot)

Any hint on why this is happening or any workarounds? Maybe related to rdar://47304789 ?
Thanks 🙂

@belkadan
Copy link
Contributor

belkadan commented Apr 1, 2019

@eeckstein, is this the same thing as before, or something new?

(Sorry, Alfredo!)

@eeckstein
Copy link
Member

Yes, looks familiar. @rjmccall?

@rjmccall
Copy link
Member

rjmccall commented Apr 1, 2019

Yep, this is what we're tracking internally as rdar://49022293. I don't think we have a JIRA open for this, though.

Try the toolchain linked here: #23572 (comment)

@adellibovi
Copy link
Contributor Author

Yes, indeed it works with @rjmccall toolchain, thanks to all of you.
@belkadan no need to be sorry, I am very happy about the work that you people are doing in order to make Swift better, things like this can happen 🙂
I do have an extra question, do you know if this will go into Swift 5.1 or a minor? Meaning: should I use the specific toolchain for my development or I could have other issues in case this toolchain have other changes?

@belkadan
Copy link
Contributor

belkadan commented Apr 2, 2019

John pulled the fix into the 5.0 branch, so if there is a 5.0.x this will probably be in it. But that's up to the release managers (and to Apple for Xcode).

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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 in itself
Projects
None yet
Development

No branches or pull requests

4 participants