swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.57k stars 10.36k forks source link

[SR-3876] Very slow compile time on relatively simple nested Struct #46461

Open swift-ci opened 7 years ago

swift-ci commented 7 years ago
Previous ID SR-3876
Radar rdar://problem/28680453
Original Reporter sroddy (JIRA User)
Type Bug

Attachment: Download

Environment Tested on Swift 3.0.1, 3.0.2 and recent 3.1 builds.
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, Performance | |Assignee | shajrawi (JIRA) | |Priority | Medium | md5: 4d459fca9a167fd9de8798563b2c3987

Issue Description:

The compiler takes a lot of time (minutes) to compile a file containing a relatively simple pair of nested Structs (see example): a Container Struct with \~100 properties of Element type. The compile time grows exponentially as more elements are added to the Element struct

The same is not happening with classes.

belkadan commented 7 years ago

@bob-wilson, do you have the Radar for similar issues?

bob-wilson commented 7 years ago

Yes. It's similar to rdar://problem/29616039, which we dup'ed to \rdar://problem/28680453\ Reduce code size for large struct copies. I'll associate that radar with this report.