Xcode build too slow especially 'Merge swift module (x86_64)

Hi
I tried to build my application with Xcode 12.

I have struggled with a bad problem which is very very slow to build or index to my app.

I looked the 'show the report navigator' tab and build messages and I find

Code Block
Compile swift source files(x86_64) 300.3 seconds
Precompiling bridging header (x86_64)
Compile AAA.swift (x86_64)
Merge swiftmodule (x86_64)


the 'Merge swiftmodule' process is especially slow.
There are any document or tips I can fix it ?

Please let me know how to improve and why it occur.
thanks.

I would first do an option-Clean Build Folder and see what happens.

Could you tell what is the longest task reported in the log (could you copy the complete log ?)
Xcode build too slow especially 'Merge swift module (x86_64)
 
 
Q