Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping xcode from indexing

Tags:

xcode

I've been working with xCode 4.5.2, and have noticed that if you are indexing, you need to stop everything and let it do it's job, or else you'll get bogged down. It's become a bit of a problem, as the project is a large one, and indexing has been taking a long time to do, and it will do it constantly. One instance was it indexed the entire project, after I worked a little bit on the project it started to re-index almost 75% of the project. I checked with source control, and there had been no changes to the project in the amount of time I worked on it.

Is there any way to stop the indexing entirely, or reduce the amount of times it indexes? Are there any downsides of turning off indexing? I had read in previous questions where it was said it prevented auto-complete and searching through the project.

like image 901
CBredlow Avatar asked Dec 19 '12 19:12

CBredlow


2 Answers

Just run this command in the terminal to turn off Indexing:

defaults write com.apple.dt.XCode IDEIndexDisable 1

To turn it back on, run this:

defaults write com.apple.dt.XCode IDEIndexDisable 0

(Note: Apparently you need to delete this key in order for the change to take affect, however, I used simply the above command and it worked fine. So if doing the above doesn't work, try deleting the key)

EDIT

Sorry, missed part of the question. Yes, it will make it so searching does not work as fast. Perhaps auto-complete will get disabled. Indexing is what allows Xcode to quickly remember what you have done. Turning it off will make it slightly harder to work with, but it improves loading time.

like image 157
Josiah Avatar answered Oct 03 '22 00:10

Josiah


Whatever is your reason to want this (mine is "An internal error occurred. Editing functionality may be limited") for Xcode 10.1:

defaults write com.apple.dt.Xcode IDEIndexDisable -bool true

Close Xcode, run this, open Xcode.

like image 14
Dark Avatar answered Oct 03 '22 00:10

Dark