I'm referring iOS, but this happens on all platforms and projects. This is a well-known issue that incremental builds using xcodebuild are significantly slower than builds using Xcode.
I can't share my projects, but you can easily reproduce it on any Xcode project.
I already have a ticket for that: FB15478221. I put there all necessary details to reproduce the issue.
Topic:
Code Signing
SubTopic:
General
Tags: