How to disable indexing in Xcode 4?

后端 未结 7 1925
礼貌的吻别
礼貌的吻别 2020-12-12 10:31

Not a long time ago I updated Xcode to version 4. This new version spent a lot of time on indexing the project (it\'s quite large). That\'s why I would like to disable index

相关标签:
7条回答
  • 2020-12-12 10:42

    My new retina Macbook pro running XCode 4 was extremely slow doing indexing (and everything else). My Mac mini at home was very fast working on the same project!? Turns out it was my anti-virus software - doing a scan of every file read or written on the MacBook. Turning that off sped everything up by a ton.

    0 讨论(0)
  • 2020-12-12 10:49

    Slow indexing is not a given. And more memory isn't necessarily better.

    I have a medium sized project for work ~ 500 source files. After deleting the derived data, it takes 18 minutes to finish reindexing this project. That's with no other apps open and not doing anything else with the computer. This is on a fairly recent Macbook Pro with 8G of memory and an i7. Horrible, right?

    My home machine is a recent Mac Mini with 4G of memory and an i5. On that machine the exact same project takes 40 seconds to completely index.

    I don't yet know what the difference is, but I'm working on it.

    0 讨论(0)
  • 2020-12-12 10:50

    Reducing the priority of the XCode process helps:

    renice 10 -p PID
    

    You can get the PID from the Activity Monitor or top/ps commands.

    0 讨论(0)
  • 2020-12-12 10:51

    This problem has been noticed on this newsgroup:

    The crux of it seems to be that XCode4 uses crazy amounts of ram during indexing - like, 5gb or so(!), and thus if you're on a machine with something like 12gb, there's no problem, but if you're on a laptop with only 2gb or so, you'll have some pretty severe paging going on.

    I'm guessing apple's internal engineers were all rocking maxed-out mac pros or something.

    0 讨论(0)
  • 2020-12-12 10:54

    I ran into either the same problem or something similar. My project includes heavily templated C++. Including those headers in the PCH file solved the problem for me.

    0 讨论(0)
  • 2020-12-12 10:59

    It's not possible to disable indexing in Xcode 4. Many of the IDE's features are built on top of the index it maintains.

    0 讨论(0)
提交回复
热议问题