"Emitting Module" takes a long time after upgrading to Xcode 14

I have a proiect (mainly Swift) that builds really fast in Xcode 12 (matter of seconds), but after upgrading to Xcode 14, the same build takes around 20 seconds. I analysed the timing of the build, and I notice that the step "Emitting Module For " takes up about 99% of the build time.

I can't find any other resources explaining what this step does, and what I could do to make it faster, so any help is welcome.

"Emitting Module" takes a long time after upgrading to Xcode 14
 
 
Q