• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 4: Navigation to Header Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 4: Navigation to Header Files


  • Subject: Re: Xcode 4: Navigation to Header Files
  • From: Andreas Grosam <email@hidden>
  • Date: Tue, 19 Apr 2011 22:04:53 +0200

On Apr 19, 2011, at 11:01 AM, Andreas Grosam wrote:

>
> On Apr 19, 2011, at 4:07 AM, Joar Wingfors wrote:
>
>>
>> On 18 apr 2011, at 09.56, David Duncan wrote:
>>
>>> On Apr 18, 2011, at 6:32 AM, Andreas Grosam wrote:
>>>
>>>> This seems trivial, but I simply cannot make it work:
>>>>
>>>> How can I navigate to a header file, which is mentioned in an #include directive?
>>>
>>> Command-Click will navigate to a header using your default navigation settings. Command-Option-Click and Command-Double Click will use your alternative navigation preferences.
>>
>>
>> In addition, you can find all includes / includees in the "related items" pop-up menu, which is at the very left of the jump bar above the editor.
>>
>> j o a r
>
>
> David, joar thank you very much for the reply.
>
> I did know of these methods - they just didn't seem to work anymore in my project. But apparently I found the source of the problem:
>
> After leaving the computer resting over night, this same feature did magically work again. The assistant editor also showed the included files again.
>
> The project has eight targets, and severals have a prefix header which includes a bunch of boost headers (spirit, phoenix, fusion, lambda, etc.). That is, this is extremely heavy work for the indexer. So, it seems, the indexer was just not ready to support navigation - even after about, say, 40 minutes.
>
> There was also no indication that the indexer was still busy. Xcode did not consume much CPU power and the iTunes like action indicator did not mention any activities as well. So, there could be some issue, which prevents the indexer to finish properly - or a display issue. In this case I would also appreciate some message from Xcode saying something like "Navigation not yet available, please wait".
>
> I will test, how long navigation will not work after a "clean".


Figured that after editing the source (for instance inserting one white space) the indexer takes roughly 26 sec to finish. The same time is required after a clean. Building takes a few seconds.

When inserting two white spaces (with a second delay in between), the indexer took 2:30 mins to finish.
Inserting or deleting a few white spaces in one source file significantly increased the time the indexer finally took to finish. In my tests, this can be several minutes up to 40 mins.

While the indexer is still in process, the navigation won't work for any target in the project.

When I quit Xcode while indexing is still in process, and reopen it, indexing finally finishes shortly. My guess is, Xcode schedules a number of requests for updating the index after each edit, without canceling the previous one when it is not yet finished.

Here is a snapshot of Xcode's call stack (taken with Instruments):

Running (Self)		Symbol Name
167401.0ms   99.5%	 	-[DVTDispatchLock performLockedBlock:]
167399.0ms   99.5%	 	 -[IDEIndexClangQueryProvider performClang:]
167395.0ms   99.5%	 	  -[IDEIndexClangQueryProvider importedFileAtDocumentLocation:withCurrentFileContentDictionary:forIndex:]
167395.0ms   99.5%	 	   -[IDEIndex importedFileAtDocumentLocation:withCurrentFileContentDictionary:]


calls into libclang dylib:
Running (Self)		Symbol Name
220263.0ms   43.2%	 	clang::SourceManager::getFileIDSlow(unsigned int) const
149571.0ms   29.3%	 	clang::SourceManager::isOffsetInFileID(clang::FileID, unsigned int) const
35044.0ms    6.8%	 	llvm::BitstreamCursor::Read(unsigned int)
18712.0ms    3.6%	 	llvm::BitstreamCursor::ReadRecord(unsigned int, llvm::SmallVectorImpl<unsigned long long>&, char const**, unsigned int*)

The CPU load is about 100% when the indexing is in process.

It also appears, that the system (MacBook Pro) is at its limit regarding disk IO.


Regards
Andreas


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode 4: Navigation to Header Files
      • From: Joar Wingfors <email@hidden>
References: 
 >Xcode 4: Navigation to Header Files (From: Andreas Grosam <email@hidden>)
 >Re: Xcode 4: Navigation to Header Files (From: David Duncan <email@hidden>)
 >Re: Xcode 4: Navigation to Header Files (From: Joar Wingfors <email@hidden>)
 >Re: Xcode 4: Navigation to Header Files (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: Debugging iPhoto plugins
  • Next by Date: Re: Xc4 as default?
  • Previous by thread: Re: Xcode 4: Navigation to Header Files
  • Next by thread: Re: Xcode 4: Navigation to Header Files
  • Index(es):
    • Date
    • Thread