swiftlang / swift

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

[SR-5009] Compiler taking too much time to Compile . #47586

Open swift-ci opened 7 years ago

swift-ci commented 7 years ago
Previous ID SR-5009
Radar None
Original Reporter dipkasyap (JIRA User)
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, Performance, TypeChecker | |Assignee | None | |Priority | Medium | md5: 78207c3b490a238c4c37480b11e7390c

Issue Description:

Xcode 8.2 , Swift 3.0 , Plateform : IOS, Device Type: Simulator

This seems an another face of "Nil Coalescing Operator" compiling issue (SR-305). Compilation time was too much long, And the main part not only compilation slows down, after compilation execution also slowed down, for example simple screen transition or performing scrolling on UITableView Slowed down.

As i was trying to construct dictionary like

let dict = [
"key1" = modalobject.someValue 1?? "default value",
"key2" = modalobject.someValue 2?? "default value",
"key3" = modalobject.someValue3 ?? "default value",
"key4" = modalobject.someValue4 ?? "default value"

]

belkadan commented 7 years ago

At least some of these cases got better in Swift 3.1. Have you been able to try it there?