Xcode 12.5 very slow launch time for app in simulator

Configuration
  • Big Sur 11.3

  • Xcode 12.5

(recently updated from Catalina and Xcode 12.4)

Problem
When running app in iOS 14.5 simulator launch takes incredibly long time (more than 30 seconds). In comparison launching installed app in simulator - 2 seconds, launching app on the real device (iOS 14.4) - 6 seconds.

Additional information
When running against simulator Xcode says "launching app", "attaching to app", and then "running app", at the running app stage we get a ~30 second pause. debugserver at 100% activity at that time.

Looking for solution
Methods described here https://developer.apple.com/forums/thread/651012 (deleting the contents of ~/Library/Developer/Xcode/iOS DeviceSupport) didn't help.
If I untick Debug Executable for the scheme app starts normally but then logically debugging isn't possible so it's not a solution.

Answered by in 677508022

As others have noticed, this issue was triggered by updating a newer versions of macOS. We have a change to address this performance issue when running on newer versions of macOS available in Xcode 13 Beta, available today.

There’s a thread about this on Twitter too - but looks like I can’t share links to Twitter here. Someone has created a radar too: FB9091473
The problem is connected with updating to Big Sur 11.3
The issue seems to be tied to having many libraries that are not part of the shared cache. That slows down dyld (it's shipped with the OS, not xcode) in unproportional way. I hope Apple will soon come up with the solution.
As @OlKir1143 said the problem it's with Big Sur 11.3, because my team mates have the same xcode version (12.5) and the problem doesn't exist. I tried everything deleting developer, deleting simulators deleted xcode, everything.
Same here. Slow launch time in iOS 14.5 Simulator and Big Sur 11.3. But everything is normal when the app runs to real device.
This also happens when running older Versions of Xcode on Big Sur 11.3, e.g. using the iOS 14.4 sim. Very annoying....
Apple just released macOS Big Sur 11.3.1 today. Let's see if Apple already fixed this problem.
Update to 11.3.1 and it's the same, can anyone confirm? On the first run after the update, xcode requested to install command line tools now i'm having new errors ex: "Class CSAudioFileManager is implemented in both". I know what is this and i didn't had before update. I think the problem it's related to this log: nw_protocol_get_quic_image_block_invoke dlopen libquic failed.
Because after this log the app it's launched
I can confirm that I am still experiencing this issue after updating to macOS Big Sur 11.3.1. Tested on iMac Pro.
Just updated to macOS Big Sur 11.3.1 and still have the problem. Anyone using macOS Big Sur 11.4 Beta? Today Apple just release the Beta 2 of macOS 11.4
I have the same problem in 11.4 beta 2. Started with 11.3. Not better with 11.3.1
The slow down in Debugger launch times can be even worse for large macOS applications. It now takes ten times longer to startup our application after upgrading to BigSur 11.3 (and 11.3.1).

Previously, the splash screen was visible almost immediately; however, it could take another minute or so to load the hundreds of dylibs, frameworks and plugin bundles to complete the application's initialization.

With this slower dyld in macOS 11.3 (and 11.3.1), the application takes over a minute before the splash screen is displayed and another 9 or 10 minutes to finish loading all the components. (This is using an iMacPro 2017, 2.5 GHz 14-Core Intel Xeon with 64GB.)

The bundles in particular are now loading very slowly. Every time I break into the debugger the top of the stack looks like this:
Code Block
Main Thread (1) Queue : com.apple.main-thread (serial)
#0 0x00000001183fb532 in _dyld_debugger_notification ()
#1 0x00000001183fa6bb in gdb_image_notifier(dyld_image_mode, unsigned int, dyld_image_info const*) ()
#2 0x00000001183fa3af in notifyGDB(dyld_image_states, unsigned int, dyld_image_info const*) ()
#3 0x00000001183ecf51 in dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) ()
#4 0x00000001183fc5a9 in ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) ()
#5 0x00000001183ed519 in dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) ()
#6 0x00000001183f8d63 in dlopen_internal ()
#7 0x00007fff20626c94 in dlopen_internal(char const*, int, void*) ()
#8 0x00007fff2061507e in dlopen ()
#9 0x00007fff20728534 in _CFBundleDlfcnLoadBundle ()
#10 0x00007fff207a18da in _CFBundleLoadExecutableAndReturnError ()
#11 0x00007fff2076932a in CFBundleGetFunctionPointerForName ()

At the moment it is not cost effective to build and test our application on macOS 11.3 or 11.3.1.

Hopefully Apple will have a fix this Debug performance issue asap.




Same here - what the heck is going on - the opposite of productivity.

If I untick Debug Executable for the scheme app starts normally but then logically debugging isn't possible so it's not a solution.

Actually, I tried that with some limited success. With that box unchecked: my app launches quickly; and I can at least see the console log statements in real time.

As I've noticed me and my colleague experiencing the same behaviour on Xcode 12,5 - extremely slow debugger it takes time to po. Also we are having a black screen on launch for some seconds 10-20 and then the app launches what the hell. Apple please fix this asap thanks!
If this is impacting your productivity take a moment to create a radar or duplicate the one mentioned by @Pat, it is likely that it will get fixed sooner.
FB9092650
Unfortunately i can't find any of the radar's in openRadar or openFeebackAssistant and in the current Feeback Assistant from apple we can't see "Radar's" opened by others.
This is mean't to waste our time and duplicate issues or i'm missing something?
I am new to "Radar". How and where to do that? I have the same problem. My tests are running for ages now.

Update: Runs way faster when disabling "Debug Executable"
I have this same issue of slow simulator but only on my Intel machine, in the M1 ones everything works smoothly.
Have you guys tried on macOS Big Sur 11.5 Beta? Lol today Apple released macOS Big Sur 11.5 Beta even though 11.4 Beta still in Beta/Release Candidate
I just tested on macOS Big Sur 11.5 Beta 1 (20G5023d). Still the same on my side...

For information, my Mac is a MacBook Pro (Retina, 13-inch, Late 2013) // 2,6 GHz Dual-Core Intel Core i5 // 16 GB 1600 MHz DDR3 // Intel Iris 1536 MB.
MacBook Pro 13, 2018, with Touch Bar - the same issue.
Not sure if this is exactly the same issue but my App will be unresponsive to mouse click for about 10 seconds after run in simulator. I've tried everything the only one worked was to delete the simulator then add it back. It only worked for maybe half a day then it'll come back unfortunately.
Seems related to the not-responsive-for-touch-for-several-seconds-bug. Big issues on first rotation (at least on iPad-simulator) as well. Still a problem in first 11.5 beta
Maybe it's something affecting only Intel macs… @imrabti said it's not affecting his M1 machines. All I have is an Intel one, though lol
For now, using a scheme with "Debug Executable" off. I just hope Apple won't try and force everyone to upgrade to M1 machines just for this; it's not an option.
— MacBook Pro 2020 - Intel
Xcode 12.5 very slow launch time for app in simulator
 
 
Q