Performance difference between Xcode's "Build for Profiling" and xcodebuild for Release

For normal testing I build an application using Xcode and selecting "Build for Profiling" from the Product menu.

For production I do "xcodebuild clean build -configuration Release ......."

I notice a big performance difference.

In my case the XCode profiling build runs in under a minute, the xcodebuild version takes over 4 minutes.

The XCode profiling build uses the Release configuration, the xcodebuild is also using the Release configuration.

What additional configuration options are being set/used when "Building for Profiling"?

I'm having a hard time finding an answer to this question.

Did you ever get to the bottom of this? I thought cleaning the build folder would fix it, but it doesn't. My code runs nearly 10x faster under the profiler than in the Release build.

Did you ever get to the bottom of this? I thought cleaning the build folder would fix it, but it doesn't. My code runs nearly 10x faster under the profiler than in the Release build.

The OP posted that question over 3 years ago. They haven't even logged onto the site in a year.

Are you also trying to hack up your own release build on the command line? I'm sure you could do that, if you took the time to learn all the details of how Xcode builds an app. But it's much easier to just do an archive build and let Xcode handle it for you.

Performance difference between Xcode's "Build for Profiling" and xcodebuild for Release
 
 
Q