2

For fun, I have started to develop games with Unreal and with that comes learning C++ and using an actual IDE. My past experience has been with web development, so something like Atom or Sublime text was all that was needed to get the job done.

Something that has been a nuisance is the indefinite indexing that can occur after builds in XCode. I realize that this is a little out of my control, since it would require Apple to fix these issues. Maybe they will and maybe they won't, but until then I would like to spend more of my time coding and less time waiting for XCode to reboot.

For reference, the reboot is being done because the CLANG process (from my understanding it is the complier responsible for the indexing in XCode) is eating up at least 95% of my CPU.

I would like to code and create game worlds more efficiently, and not have to deal with this indexing issue so much. Since I can't fix the issue then maybe there is a way to avoid it. I was hoping that some insight could be shared in this regard. These are the two things that I have noticed that can set it off:

  1. If there is an error or a warning during the build, then this can trigger the indexing to run indefinitely. I can fix the issue, re-initialize the build, and then the indexing continues to run indefinitely :(. If there are no issues or errors during the build, then indexing would actually complete in a timely manner. For me, I don't see any avoidance other than don't make errors or create warnings (which I can tell you, is unavoidable because I will make errors).
  2. The second, which seems to be easier to avoid, is that if I do any clicking, button pushing, etc. in Xcode while it is building then this can also set off the indefinite indexing.

I have read several posts, forum discussions, etc. on this issue and tried several of the suggestion, i.e. removing the DerivedData from Xcode. It looks like you can even turn indexing off. This shuts down the auto-complete and refactoring features, which might in the end be worth it since (Refactor -> Extract Function) hasn't exactly been kind either.

Any workflow suggestions on things to do and things NOT to do is this kind of scenario would be appreciated!

Long post, but I thought this could be good for anyone else in similar shoes, so I wanted to include details.

  • I had the exact same problem with Xcode 8. I would turn indexing off completely but then lose some of the nice features. I finally decided to give up on Xcode and moved to QtCreator, which is actually very good. I am very disappointed that Xcode 9.4 still has the same issue... – linuxfever Jul 10 '18 at 20:45
  • Thanks! I will definitely check out QtCreator. I have seen the issue go back as far as 4.x.x. Doesn't look like the issue is a priority over there. – Braden Altstatt Jul 10 '18 at 22:20
  • I'm not sure if this helps, but when this happened to me, I noticed the project directory had a cloud icon with a down arrow next to it, and several files inside the project also had cloud icons, suggesting that some files may not actually be on the hard drive. It could be an OS level iCloud syncing issue – bluegreen Sep 07 '18 at 18:03

1 Answers1

0

When this happened to me, I thought it might be because iCloud Drive was stalling for some reason (as i mentioned in my comment). I didn't really need it to be synced, so I just moved the project directory to outside the iCloud Drive, then the infinite indexing problem went away.

I'm not sure if you're using iCloud or not, but hopefully this answer helps someone anyway.

bluegreen
  • 384
  • 3
  • 15