tulsi
tulsi copied to clipboard
Using Xcode 12 Beta to open large project is very slow or even stuck.
Our project is a large project(more than 14000 source files). We are using Bazel to organize our project and use Tulsi to generate our xcodeproj file. It is very slow when we use Xcode 12 Beta6 to open our xcodeproj file every time(more than 10 minutes), sometimes it even get stuck.
I thought this is an Xcode 12 regression. I’ve filed a radar about it.
The workaround is to generate a focused project, by editing your .tulsigen
's sourceFilters
to only include what you want to see in the generated project.
Yeah, we've noticed the same thing internally. Will confirm this is still an issue with the Xcode 12 GM, planning to add new CLI options to help with this focus style of project generation.
Another workaround (if you are prepared to lose all code completion) is to temporarily disable Xcode indexing: defaults write com.apple.dt.Xcode IDEIndexDisable -bool true
and restart Xcode.
The root cause of the problem is too many (indexer) targets outside of the active scheme, spindump:
432 __76-[IDESourceKitIndexableProxy productHeadersInWorkspace:withCompletionBlock:]_block_invoke + 63 (IDEFoundation + 5046289) [0x10a84e011]
432 -[Xcode3Target productHeadersInWorkspace:withCompletionBlock:] + 291 (DevToolsCore + 2605117) [0x1261ae03d]
432 -[Xcode3Target _buildParametersForIndexingInWorkspace:] + 230 (DevToolsCore + 2594188) [0x1261ab58c]
430 -[IDEWorkspace(IndexingBuildParameters) ideIndex_buildParametersForIndexingBlueprint:synthesizedMacroOverrides:] + 122 (IDEFoundation + 5124174) [0x10a86104e]
430 -[IDEWorkspace(IndexingBuildParameters) ideIndex_runDestinationForIndexingWithScheme:] + 303 (IDEFoundation + 5125952) [0x10a861740]
430 -[IDERunDestination isValidRunDestinationForScheme:schemeTask:schemeCommand:executionEnvironment:overridingTestingSpecifiers:runDestinationManager:error:] + 118 (IDEFoundation + 3065322) [0x10a66a5ea]
I tried attaching the indexer targets to the app schemes, which ended up fixing this issue but then building fails (just spins forever).
We've filed a radar for this: FB8286145
Testing this with the Xcode 12 GM right now, initial checks indicate it might be fixed
Seems to be improved but not fixed, some of our larger projects can take a couple minutes before the files/folders show up
Filed new issue against Xcode 12 (GM) as FB8705312, improved but still not back to Xcode 11 speeds for large projects
Xcode13 have same question
Thanks for submitting this issue but this tool is being deprecated. Please checkout rules_xcodeproj for a more complete and maintained Xcode integration.