Code Block 3.37 s 45.6% 0 s debugserver (37427) |
3.36 s 45.6% 0 s Main Thread 0x5af1b6 |
3.36 s 45.6% 0 s start |
3.36 s 45.6% 0 s main |
3.36 s 45.6% 0 s RNBRunLoopInferiorExecuting(RNBRemote*) |
3.36 s 45.5% 0 s RNBRemote::HandleReceivedPacket(RNBRemote::PacketEnum*) |
3.35 s 45.4% 0 s RNBRemote::HandlePacket_jGetLoadedDynamicLibrariesInfos(char const*) |
3.35 s 45.4% 0 s DNBGetLibrariesInfoForAddresses(int, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> >&) |
3.35 s 45.4% 0 s MachProcess::GetLibrariesInfoForAddresses(int, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> >&) |
3.35 s 45.4% 0 s _dyld_process_info_create |
3.35 s 45.4% 0 s withRemoteBuffer(unsigned int, unsigned long long, unsigned long, bool, int*, void (void*, unsigned long) block_pointer) |
3.35 s 45.4% 0 s ___dyld_process_info_create_block_invoke |
3.35 s 45.4% 0 s std::__1::unique_ptr<dyld_process_info_base, dyld_process_info_deleter> dyld_process_info_base::make<dyld_all_image_infos_64, dyld_image_info_64>(unsigned int, dyld_all_image_infos_64 const&, unsigned long long, int*) |
3.35 s 45.4% 0 s withRemoteBuffer(unsigned int, unsigned long long, unsigned long, bool, int*, void (void*, unsigned long) block_pointer) |
3.34 s 45.2% 2.00 ms invocation function for block in std::__1::unique_ptr<dyld_process_info_base, dyld_process_info_deleter> dyld_process_info_base::make<dyld_all_image_infos_64, dyld_image_info_64>(unsigned int, dyld_all_image_infos_64 const&, unsigned long long, int*) |
3.34 s 45.2% 0 s dyld_process_info_base::addImage(unsigned int, bool, unsigned long long, unsigned long long, char const*) |
3.07 s 41.6% 0 s dyld_process_info_base::copyPath(unsigned int, unsigned long long) |
3.07 s 41.6% 1.00 ms withRemoteBuffer(unsigned int, unsigned long long, unsigned long, bool, int*, void (void*, unsigned long) block_pointer) |
3.06 s 41.5% 1.00 ms RemoteBuffer::create(unsigned int, unsigned long long, unsigned long, bool) |
3.06 s 41.5% 1.00 ms RemoteBuffer::map(unsigned int, unsigned long long, unsigned long) |
2.96 s 40.1% 1.00 ms mach_vm_remap_new |
2.96 s 40.1% 2.00 ms _kernelrpc_mach_vm_remap_new |
2.96 s 40.1% 1.00 ms mach_msg |
2.96 s 40.1% 2.96 s mach_msg_trap |
50.00 ms 0.6% 1.00 ms mach_vm_deallocate |
38.00 ms 0.5% 38.00 ms _platform_memmove$VARIANT$Haswell |
9.00 ms 0.1% 4.00 ms _malloc_zone_malloc |
1.00 ms 0.0% 1.00 ms malloc |
3.00 ms 0.0% 0 s invocation function for block in dyld_process_info_base::copyPath(unsigned int, unsigned long long) |
1.00 ms 0.0% 0 s free_small |
1.00 ms 0.0% 1.00 ms _Block_object_dispose |
257.00 ms 3.4% 0 s dyld_process_info_base::addInfoFromRemoteLoadCommands(unsigned int, unsigned long long) |
11.00 ms 0.1% 10.00 ms dyld_process_info_base::addInfoFromLoadCommands(mach_header const*, unsigned long long, unsigned long) |
8.00 ms 0.1% 0 s RemoteBuffer::create(unsigned int, unsigned long long, unsigned long, bool) |
2.00 ms 0.0% 0 s _dyld_process_info_for_each_image |
1.00 ms 0.0% 0 s MachProcess::GetMachOInformationFromMemory(unsigned int, unsigned long long, int, MachProcess::mach_o_information&) |
1.00 ms 0.0% 0 s free_tiny |
1.00 ms 0.0% 0 s RNBRemote::SendPacket(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) |
3.00 ms 0.0% 0 s RNBRemote::HandlePacket_v(char const*) |
2.00 ms 0.0% 0 s RNBRemote::HandlePacket_p(char const*) |
1.00 ms 0.0% 0 s RNBRemote::HandlePacket_c(char const*) |
1.00 ms 0.0% 1.00 ms DYLD-STUB$$__error |
2.00 ms 0.0% 0 s HandleProcessStateChange(RNBRemote*, bool) |
1.00 ms 0.0% 0 s PThreadEvent::WaitForSetEvents(unsigned int, timespec const*) const |
1.00 ms 0.0% 0 s MachTask::ExceptionThread 0x5af1be |
2.98 s 40.3% 0 s Instruments (37042) |
249.00 ms 3.3% 0 s Xcode (3162) |
225.00 ms 3.0% 0 s WindowServer (150) |
160.00 ms 2.1% 0 s lldb-rpc-server (6834) |
118.00 ms 1.5% 0 s UE4Editor (37426) |
102.00 ms 1.3% 0 s -[UE4AppDelegate runGameThread:] 0x5af2f7 |
102.00 ms 1.3% 0 s thread_start |
102.00 ms 1.3% 0 s _pthread_start |
102.00 ms 1.3% 0 s __NSThread__start__ |
102.00 ms 1.3% 0 s -[FCocoaGameThread main] |
102.00 ms 1.3% 0 s -[UE4AppDelegate runGameThread:] |
102.00 ms 1.3% 0 s GuardedMain(char16_t const*) |
102.00 ms 1.3% 0 s EnginePreInit(char16_t const*) |
102.00 ms 1.3% 0 s FEngineLoop::PreInit(char16_t const*) |
102.00 ms 1.3% 0 s FEngineLoop::PreInitPostStartupScreen(char16_t const*) |
102.00 ms 1.3% 0 s FEngineLoop::LoadStartupModules() |
102.00 ms 1.3% 0 s FPluginManager::LoadModulesForEnabledPlugins(ELoadingPhase::Type) |
102.00 ms 1.3% 0 s FPluginManager::TryLoadModulesForPlugin(FPlugin const&, ELoadingPhase::Type) const |
102.00 ms 1.3% 0 s FModuleDescriptor::LoadModulesForPhase(ELoadingPhase::Type, TArray<FModuleDescriptor, TSizedDefaultAllocator<32> > const&, TMap<FName, EModuleLoadResult, FDefaultSetAllocator, TDefaultMapHashableKeyFuncs<FName, EModuleLoadResult, false> >&) |
97.00 ms 1.3% 0 s FModuleManager::LoadModuleWithFailureReason(FName, EModuleLoadResult&) |
92.00 ms 1.2% 0 s FMacPlatformProcess::GetDllHandle(char16_t const*) |
92.00 ms 1.2% 0 s GetDllHandleImpl(NSString*, NSString*) |
92.00 ms 1.2% 0 s dlopen |
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).