Our app has 72k lines of Swift code in 922 files and 500+ lines of Obj-C code.
Our clean build time is about 4 minutes.
When changing code in a very minor way, e.g. adding a line in a view controller, our incremental build time is about 2-3 minutes. Which is a lot.
We have done many optimizations such as warn-long-expression-type-checking, decrease file size, avoid declaring many types in one file, and reduce 3rd party dependencies. We were able to shave off only about 20 seconds. Which is not very satisfying for me.
One thing we are exploring is modularize the code. We tried pulling out our core models code as a Swift Package, which contains like 20-30 types. But our incremental build time doesn't improve in anyway.
Is there anything else we can do to improve incremental build time with such a large code base? Will these things works?
Our clean build time is about 4 minutes.
When changing code in a very minor way, e.g. adding a line in a view controller, our incremental build time is about 2-3 minutes. Which is a lot.
We have done many optimizations such as warn-long-expression-type-checking, decrease file size, avoid declaring many types in one file, and reduce 3rd party dependencies. We were able to shave off only about 20 seconds. Which is not very satisfying for me.
One thing we are exploring is modularize the code. We tried pulling out our core models code as a Swift Package, which contains like 20-30 types. But our incremental build time doesn't improve in anyway.
Is there anything else we can do to improve incremental build time with such a large code base? Will these things works?
modularize more parts of the app
use binary framework instead of source code framework
anything else