We're also facing this problem in Xcode 15.2 using Swift 5.9.2, and emitting our iOS target module takes around 50 seconds. Even though it happens in parallel with changed sources compilation, the module emission does slow the build down quite significantly.
"Emitting module" is a bit of a gray area for me, and trying to inspect it using methods others have listed in this thread didn't result in much.
At the risk of sounding stupid, why does the build emit a Swift module for the iOS target at all, if no other target imports it? I suppose it is a required part of the build - I've tried disabling debugging, testability, and toggling some build settings that relate to Swift modules, and the build was still emitting a module.
If emitting a module is required nonetheless, what would be good candidates to tinker with, in aim for making single module emission a faster process? Maybe there's some non-obvious things like having both SPM and CocoaPods dependencies, generics, lots of extensions scattered around the target's files, Objective-C exposure of some Swift classes and extensions, something else?