Xcode 8 very slow Swift compiling

后端 未结 8 1470
太阳男子
太阳男子 2020-12-12 13:54

Ever since Swift 3 and Xcode 8 my project compiles quite slowly. Every time I add so much as an empty line to a file, recompiling takes a full minute. When I check the outpu

8条回答
  •  囚心锁ツ
    2020-12-12 14:23

    This worked for me on one of my projects.

    Go to Product -> Scheme -> Edit Scheme. Select Build in left side column and uncheck "Find implicit dependencies" But this flag should remain checked when you are building the project for first time..

    Source

    It was a simple project and it increased one of my builds from 1 minute to 2 seconds.

    On a physical Device I got these results. For one of my larger projects (42 files) in only decreased it from 2:36 to 2:20. Then I added: SWIFT_WHOLE_MODULE_OPTIMIZATION = YES to Build Settings as a user defined setting. The time went down to - 2:00

    On the simulator the build was 49 seconds the first time then I used.

    Go to Product -> Scheme -> Edit Scheme. Select Build in left side column and uncheck "Find implicit dependencies" But this flag should remain checked when you are building the project for first time..

    and the build took 7 seconds.

    I hope this helps.

提交回复
热议问题