Xcode indexing takes ages and uses gigabytes of memory
Found it !!
I needed to remove use_frameworks!
from my Podfile (make sure you use cocoapods > 1.5.0) and add
install! 'cocoapods', :disable_input_output_paths => true
Source: https://www.ralfebert.de/ios/blog/cocoapods-clean-input-output-files/
I have pretty similar issue. After deleting up to 20+ swift files from project, the bug is resolved.