iOS- . Swift, Objective-C-. , . , clean , , .
. debug-, . , , , . , , .
1. , .
Swift , . Swift-. , :
xcodebuild -workspace App.xcworkspace -scheme App clean build OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" | grep .[0-9]ms | grep -v ^0.[0-9]ms | sort -nr > functions_build_analysis.txt
App.xcworkspace workspace , App , .
"-Xfrontend -debug-time-function-bodies" . grep , , functions_build_analysis.txt.
, 17 , 6. Nil Coalescing . :
let object = Object(param1: param1Value ?? defaultParam1Value,
param2: param2Value ?? defaultParam2Value)
, 300 .
, Swift. . ??, ?: , , , .
.
, , 30 , .
2. Debug-.
debug- , . ,
Yes, .
Yes, . , No. Pod, . 10 21 , , .
3. Whole Module Optimization.
Swift-
-whole-module-optimization. , : . Xcode Optimization Level, :
Whole Module Optimization debug-. -O, SIL-, . :
App was compiled with optimization - stepping may behave oddly; variables may not be available.
, -Onone Other Swift Flags. , .
debug 3 .
4. Precompiled Bridging Headers.
, . -whole-module-optimization , , Release-.
-enable-bridging-pch.
, Bridging- Objective-C. , Objective-C Swift.
-whole-module-optimization -enable-bridging-pch 15%.
Debug- : whole-module-optimization. (clean build) 6 1 20 , . Swift, .
P.S.: , :
Mac mini (Late 2012)
2,3 GHz Intel Core i7
16 GB 1600 MHz DDR3
250 GB SSD
https://habrahabr.ru/post/331044/