Codesign really slow since updating to sierra 10.12.1

Anyone else has this issue? What can be done to fix that?

Solved Answer

I had the same problem. I looked in my keychain and there were over 500 copies one of my certificates, and a few others were duplicated a few hundred times. I removed all the duplicates and kept just one of each, and my code signing time went from 30 seconds per framework down to about 1 second per. I don't know how the certificates were duplicated, but the timing of the issue suggests it was due to updating Sierra to 10.12.1.

19 Replies

yap. same issue here.

I have the same Issue too. It looks that we are not the only ones with this problem: http://stackoverflow.com/questions/40257968/slow-app-compilation-with-new-sierra-update

Same issue here.

Can't even work with real devices anymore. Have to use simulators only.

It's taking almost 10min to build on a top 2015 MBP for devices.

I found a temporary solution for this. If you create a new account in your Mac this works perfectly again... I hope Apple can fix it ASAP.

I filed a Radar on this if anybody wants to dupe it:


https://openradar.appspot.com/radar?id=5545922842853376

I do have the exact same error. Apple please fix as soon as possible.

Had the same problem. It looks like it went away after I cleaned up my keychains. Backup your keychains first. I'm not sure why, but I had to re-enter the e-mail passwords and etc. as result of the following procedure (it looks like iCloud keychain got disconnected, so after I enabled it again in iCloud preferences, I got back all my passwords). The only thing that I lost is the "saved" password for my private ssh key (~/.ssh/id_rsa) (luckily I was able to recover it from my memory).


What I did:


1. I switched to single login keychain (had two extra keychains holding the certificates)

2. Created a new empty keychain

3. Made the new keychain default

4. Transferred the certificates to the new keychain

5. Disconnected the old keychain

6. Verified that the signing is OK with Xcode

7. Connected the old keychain (it was renamed to login_renamed.keychain - renamed it back together with login_renamed.keychain-db)

8. Made the old keychain default.

9. Disconnected the keychain created on step 2.


Just in case, people in this thread report that they cleaned up duplicate certificates in their keychains, I can confirm that I remember that I also had something like 10 duplicates that I deleted. Probably that's related/worth trying first.


The signing is still slow. But it no longer takes 4 minutes for the project I'm working on (it has something like 20 frameworks to sign). Something like 20 seconds on Mac Book Pro 13 Late 2011.

Has anyone downloaded the latest 10.12.1 build (12B2657) to see if the issue is still present? Will give it a try on my now borked iMac to see if it does.

Lovely - two versions of the same version - macOS 10.12.1 build (16B2555) & 10.12.1 build (12B2657)...

Same problem for me with today's build installed.

Has anyone else tried this and also had success? Before I start doing surgery on my keychains, would be nice to know it is a universal fix.

I had the same problem. I looked in my keychain and there were over 500 copies one of my certificates, and a few others were duplicated a few hundred times. I removed all the duplicates and kept just one of each, and my code signing time went from 30 seconds per framework down to about 1 second per. I don't know how the certificates were duplicated, but the timing of the issue suggests it was due to updating Sierra to 10.12.1.

I also had this same problem. In my KeyChain I had 1700+ in the 'My Certificates' section, I delete all but the current Apple certs that I needed and it took my codesigning time down from 4mins to 3secs!

Huh. It probably goes through each of them until it finds one that works. This would explain why it takes so much time...


By the way, here's what I found in Keychain Access:

This was exactly it! Deleted all duplicates, but one and now build times are rocket quick. Thanks!