Monday, April 14, 2008

How To: Improve the speed of Apple XCode

Here is the problem I faced few days ago..

Lately I have been working on a old G5 dual core Machine. Well, the project was a huge one, containing around 2k source files.

Since, I started working on this project, XCode completely lost its responsiveness. XCode was so slow that, when I typed something, it was apparently taking few seconds to show them-up on screen.

I have been working on XCode on the same machine, for few small projects and I had never faced this kind of problem.

I searched many forums and apple website/mailing list and found no solution, whatsoever. :-(

After so much of R&D, I was able to find out the cause of this XCode problem.

Well, It was the source code indexing process, which slowed down the XCode.

and the solution for this is to turn off the code indexing feature.

I turned off the code indexing, and voila!, XCode was as fast as it was before!

Turning off code indexing will speed up your XCode. Code indexing is a slow process, particularly when
  • you have low system memory
  • you have a slow processor
  • you are working on a very huge project.
Only side-effect of this is that, Once you turn of code indexing, you will no longer be able to do Jump to definition(command + double click)

To turn the indexing off, follow the following steps.

Skill level: Beginner

step1: Open Xcode
step2: Goto XCode -> Preferences ( Shortcut key: Command key + , )
step3: Goto Code sence tab
step4: Under Indexing, uncheck the check box for "Enable for all projects"

That's it!

Here are images..



Only side effect of this is that, you will no longer be able to do Jump to definition(command + double click) on your source file.

Please comment, if you have any suggestions.

No comments: