Xcode 8 very slow Swift compiling

后端 未结 8 1497
太阳男子
太阳男子 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:34

    Make sure you're not combining arrays like let combinedArrays = array1 + array2. There's a known bug as well for type inference here, where Swift wastes time trying to figure out what type the combinedArrays should be. Instead, [array1, array2].joined() should work just as well, and compile far faster.

提交回复
热议问题