Xcode lags in large fast files

Why is Xcode lagging behind in large files and does anyone know how to stop this?

I have a .swift file that contains 8000 lines of code, and when I try to change the file, Xcode changes my cursor to a beach ball and lags.

Does anyone know why this is happening or how to fix it without breaking the file into smaller pieces?

+6
source share
2 answers

Recent versions of Xcode are buggy , especially with SourceKit.

Remember that Swift is a safe type , and every time you change something, the project code is reanalyzed. Because of this and the combination of your large application, this may be the cause of your problem.

Also, make sure that your hardware specifications are “good” for development (it may be just to free up memory or you may need to upgrade your hardware).

These problems can be solved in Xcode 6.3 + Swift 1.2.

Hope it lit up :)

+1
source

Get the top of the line Mac Pro with 1 gigabyte per second SSD and 64 GB of RAM. Or even better, build a hackintosh and overclock the processor to 7 GHz. The problem is resolved.

-3
source

Source: https://habr.com/ru/post/981213/


All Articles