A performance question for developers who have experience with adding swift into existent Objective-C codebase.
My premise is: eventually Bridging-Header.h
might become really big (it might end up containing all 1.5k existent Objective-C classes (give or take classes those that won't be accessed from Swift)) and vice versa for PRODUCT-Swift.h
generated header.
I fear the compilation performance might decrease dramatically: every time any of the included .h
classes has changed it will have to recompile all .swift
files.
Is this the case? If so, is there any way to optimise performance?
Clarification:
Imagine that you included your entire project classes into .pch
file, now every class change will trigger recompilation of the entire project. Is it similar to the way Bridging-Header.h
works?