[swift-users] Improving compilation times?
jon at jonshier.com
Wed Mar 22 17:37:47 CDT 2017
It’s a rather severe regression from Objective-C, where equivalent amounts of code could be compiled in 2 - 3 minutes. I think we all understand why swiftc is so much slower than clang, but it’s concerning that, with all of the talk of new features or changes for Swift 4, there’s no comment on the degree of effort being put into improving build times or diagnostics. I’m pretty sure the answer is “ongoing” but given that performance and diagnostics both seemed to regress from Swift 2 - 3, some in the community are concerned about ongoing progress and priority. Personally, I’d much rather have better performance, stability, and diagnostics over enhancements to the Dictionary API, but that’s just personal opinion.
Does Swift, in any area, have any guiding performance, stability, or diagnostic principles? In the early days of WebKit, and I believe still to this day, they had a guiding principle of no performance regressions, even for increased correctness. Performance losses for correctness or new features had to be offset by performance gains elsewhere. AFAIK, Swift has no such official policy. I think the community would appreciate such a commitment. I would, at least.
> On Mar 22, 2017, at 5:59 PM, Jan Neumüller via swift-users <swift-users at swift.org> wrote:
> I may be old - But what is abnormal at 10mins compilation time? Looks perfectly fine to me - I still remember hours of compilation…
>> On 22 Mar 2017, at 21:03, piotr gorzelany via swift-users <swift-users at swift.org> wrote:
>> Hi, I hope I reached the right mailing list to ask a question about tooling.
>> Can somebody from the compiler or Xcode team share some tips on how to improve compilation times of larger Swift projects?
>> I am an iOS developer and the largest issue my team has with Swift so far is that when the project gets semi large (~30 000 lines) the compilation times start to be high (~10 minutes from clean). This is a MAJOR downside since iOS development oftentimes requires rapid changes to UI or logic. Every person of my team compiles a project at least 10 times a day to test new features or functionalities. When compilation times start to be higher than 10 minutes that gets us to ~1.5h a day of developer time spend just on compiling. Not to mention the focus lost when this is happening.
>> I know the Swift Evolution list is buzzing with new ideas and features but from my experience the compilation times is a CRITICAL thing to improve in the next Swift release since it cost real money to waste all those developer hours. Just think of all the hours lost on compiling across all Swift devs worldwide and you will get to probably dozens of thousand of dev hours a day.
>> Is the core compiler team going to address compilation performance in the next release?
>> Maybe there is an existing solution to long compilation times that we don't know of? It would be great if anybody could share.
>> I was thinking maybe of dividing the app into multiple frameworks since I think frameworks are compiled only once only on change?
>> swift-users mailing list
>> swift-users at swift.org
> swift-users mailing list
> swift-users at swift.org
More information about the swift-users