Thanks Adrian again. I've used a bad terminology or incorrectly described what I did.
Why are you removing module map files?
I'm removing modulemap files generated by CocoaPods for me. Turns out if I remove them and let Xcode generate default ones, lldb works faster. For now I do this for frameworks that only contain Swift code though.
CocoaPods modulemap:
framework module Gallery {
umbrella header "Gallery-umbrella.h"
export *
module * { export * }
}
module Gallery.Swift {
header "Gallery-Swift.h"
requires objc
}
I delete this ^^ and let Xcode generate a default modulemap which looks like:
framework module Gallery {
header "Gallery-Swift.h"
requires objc
}
Again, I do this for 171 Swift frameworks. This speeds up lldb quite a bit.
should strive to just make everything a Clang module
Again thanks for this, I've eliminated bridging header entirely. Now there are only clang modules. This gave ~11 seconds improvement (61 ses -> ~50).
Now, back to CocoaPods' modulemaps. After I've deleted them, lldb perf has improved: 50 sec -> 36 sec.
Since the only difference I spotted is this part:
framework module Gallery {
umbrella header "Gallery-umbrella.h"
export *
module * { export * }
}
, and because -umbrella.h headers contain @import UIKit; wrapped with some #if-s, I decided that this is what causes slowdowns of lldb. Is this a correct theory?
I do not understand what you mean with "unwrap" here.
I thought that lldb would preprocess #imports like clang does (expand them recursivaly to a megabytes of text). My tests showed this is not a case, or at least this is not a bottleneck at all, and you confirmed that I shouldn't be doing this.
