Find the settings slowing down your builds.
Paste your build settings. They're checked in your browser and never uploaded.
Run this in your project folder, then copy the output. Use -workspace instead of -project if you have one.
The output of xcodebuild -showBuildSettings, or the contents of an .xcconfig file.
In Release, compiling a Swift module as a whole lets the optimiser see everything. In Debug it means a one-line change recompiles the entire module. Debug should use Incremental (singlefile).
With ONLY_ACTIVE_ARCH = NO, a Debug build compiles for both Apple silicon and Intel (or every simulator architecture), roughly doubling the work for builds you only run on one machine.
dwarf-with-dsym runs dsymutil after linking. You need dSYMs to symbolicate crash reports from Release builds, not for builds you run from Xcode.
One complicated expression can take seconds to type-check. Adding -Xfrontend -warn-long-function-bodies=200 and -Xfrontend -warn-long-expression-type-checking=200 to Other Swift Flags in Debug makes Xcode warn you about any function or expression that takes longer than 200 ms.