Tuesday, November 26, 2019

Slow Xcode 11 Objective-C Builds

Chris Liscio:

When I build my app, Xcode 11 appears to stall out completely (dropping from full core usage down to 10-20% CPU) during the Objective-C build phases.

[…]

The bug manifested for me like this:

  1. Starting with a clean DerivedData folder, I can build my app, Capo in about 60 seconds, flat.
  2. Once I clean the build folder using command-shift-K, all subsequent builds will take anywhere from 180s to 500s (in the very worst case, which I’ve not seen for a while now.)

After some back & forth with Apple’s engineers, I learned to turn on clang’s -Rmodule-build flag to see what’s going on behind the scenes. It turns out that—for every Objective-C file that is built—framework modules are being re-built unnecessarily.

2 Comments RSS · Twitter


They’re trying to make Swift complies look fastwr


Were you able to fix this? What were the changes you did?

Leave a Comment