SwiftGoingFaster by Precompiled Bridging Headers

Faster Mix-and-Match Builds with Precompiled Bridging Headers

apple_swift_logo

PROBLEM :
Every time a Swift file in a mixed-language target is compiled, the Swift compiler parses the project’s bridging header in order to make Objective-C code visible to Swift code. When the bridging header is large and the Swift compiler runs many times – as in a debug configuration – the cost of repeatedly parsing the bridging header can be a substantial part of the overall build time.

In Swift 3.1, you can reduced debug build time by 30% by using the new -enable-bridging-pch Swift flag for this issue. This mode is still experimental and must be manually enabled, but it will be enabled by default if developer feedback indicates it’s working well and providing significant speedup… so try it out!

Build Settings
Build Settings

Related Link : Faster Mix-and-Match Builds with Precompiled Bridging Headers
Happy Coding 🙂