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.
The problem seems to be related to Big Sur 11.3 and Big Sur 11.4. Not to specific Xcode version (Xcode 12.4 got about the same results that 12.5).
I do some measures for 2 applications in debug on Big Sur 11.1 and Big Sur 11.4. Here the launch time results: App1 - Big Sur 11.1 = 0m21s - Big Sur 11.4 = 1m20s App2 - Big Sur 11.1 = 0m31s - Big Sur 11.4 = 5m08s
Conclusion: Debugging Application on 11.4 is between 4 to 10 time slower than 11.1.
Note App2 have nearly 100 dylib to load while App1 have only 30.
@oldnpoor I am using Big Sur, but my build always fails with the Build input cannot be found. Here If I removed the product name in the build settings, Build got succeeded. But the app was not installed because the .app file was not available in the
Build input file cannot be found: '/Users/name/Library/Developer/Xcode/DerivedData/App-dhdivlzaazbnhtguhlgnkkglsibo/Build/Products/Debug-iphonesimulator/Hello App.app/Hello App.
Could you please let me know any workarounds.Upgrading to macOS 11.6 helped somewhat - after a brief evaluation, debugging seems doable now with "only" 15-30 second pauses. Better than the several minutes observed with 11.3 but still a horrible developer experience (small project size with a few dependencies).