• 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
Xcode eats 100% CPU and more while typing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode eats 100% CPU and more while typing


  • Subject: Xcode eats 100% CPU and more while typing
  • From: Axel Balley <email@hidden>
  • Date: Mon, 4 Feb 2008 15:50:55 +0100

Hi list,
I've been experiencing a major problem in my XCode project since a few days. It will randomly eat up loads of CPU while I'm editing a document. It will take from 100 to 150% CPU at those moments. I usually stop typing at that point because even text editing becomes too laggy. Even though I'm not doing anything anymore, the CPU eating still lasts about 20 seconds.
I've sampled the XCode process to see what could possibly go on, and from the look of it XCode is having a hard time parsing my code. See the end of my message for a sample. It happens that often now that I'm considering switching to an external text editor.
Is this a known issue ? Any advice to stop that behavior ? I can't afford to turn off Code Indexing as I need it too badly for code navigation.


Thanks in advance.

Best,

Axel B.


Sampling process 1500 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Xcode (pid 1500) every 1 millisecond
Call graph:
1867 Thread_2503
1867 0x1fc6
1867 NSApplicationMain
1867 -[NSApplication run]
1867 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
1867 _DPSNextEvent
1867 BlockUntilNextEventMatchingListInMode
1867 ReceiveNextEventCommon
1867 RunCurrentEventLoopInMode
1867 CFRunLoopRunInMode
1867 CFRunLoopRunSpecific
1390 mach_msg
1390 mach_msg_trap
1390 mach_msg_trap
477 __CFRunLoopDoObservers
477 -[XCRunLoopMonitor _runLoopWillRun]
477 -[NSConditionLock lockWhenCondition:]
477 -[NSConditionLock lockWhenCondition:beforeDate:]
477 -[NSCondition waitUntilDate:]
477 pthread_cond_timedwait_relative_np
477 _pthread_cond_wait
477 semaphore_timedwait_signal_trap
477 semaphore_timedwait_signal_trap
1867 Thread_2603
1867 thread_start
1867 _pthread_start
1867 auto_collection_thread(void*)
1867 pthread_cond_wait$UNIX2003
1867 __semwait_signal
1867 __semwait_signal
1867 Thread_2703
1867 thread_start
1867 _pthread_start
1867 fe_fragment_thread
1867 pthread_cond_wait$UNIX2003
1867 __semwait_signal
1867 __semwait_signal
1867 Thread_2803
1867 thread_start
1867 _pthread_start
1867 __NSThread__main__
1867 -[NSThread main]
1867 -[XCInvocationQueue _processInvocationsInThreadSlotNumber:]
1867 pthread_cond_wait$UNIX2003
1867 __semwait_signal
1867 __semwait_signal
1867 Thread_2903
1867 thread_start
1867 _pthread_start
1867 __NSThread__main__
1867 -[NSThread main]
1867 +[PBXDebugSessionModule _startCrashCatchingServiceThread]
1867 mach_msg
1867 mach_msg_trap
1867 mach_msg_trap
1867 Thread_2a03
1867 thread_start
1867 _pthread_start
1867 __NSThread__main__
1867 -[NSThread main]
1867 -[XCInvocationQueue _processInvocationsInThreadSlotNumber:]
1867 -[XCInvocationQueue _processNextInvocationInThreadSlotNumber:]
1867 -[NSInvocation invoke]
1867 __invoking___
1867 -[PBXProjectIndex _indexBackground:]
1867 -[PBXDevKitIndexingEngine indexFileAtAbsolutePath:withSettings:]
1867 ObjcParse::translationUnit()
1867 ObjcParse::externalDeclaration()
1867 ObjcParse::declaration(DeclarationContext)
970 ObjcParse::initDeclaratorList(objc_object*, int, Token*)
970 ObjcParse::initDeclarator(objc_object*, int, Token*)
913 ObjcParse::declarator(objc_object*, Token**, Token*)
911 PBXIndexCParseActions::beginDeclarator(objc_object*, Token*)
910 TokenBuffer::tokenLine(Token*)
871 TokenBuffer::nextToken(Token*)
871 TokenBuffer::nextToken(Token*)
39 TokenBuffer::tokenLine(Token*)
1 PBXIndexCritical::PBXIndexCritical(PBXProjectIndex*)
1 -[PBXProjectIndex beginCriticalSection]
1 -[XCRunLoopMonitor blockRunLoopAfterIdleInterval:]
1 -[XCRunLoopMonitor _waitForIdleInterval:blockMonitoredThread:]
1 CFAbsoluteTimeGetCurrent
1 gettimeofday
1 __gettimeofday
1 __gettimeofday
1 ObjcParse::nextToken()
1 Cpp::nextToken()
1 Cpp::nextToken0()
1 TokenBuffer::addToken(Token*)
1 TokenBuffer::addToken(Token*)
1 PBXIndexCParseActions::addTypeToken(TokenType, objc_object*)
1 PBXIndexCritical::PBXIndexCritical(PBXProjectIndex*)
1 -[PBXProjectIndex beginCriticalSection]
1 -[XCRunLoopMonitor blockRunLoopAfterIdleInterval:]
1 -[XCRunLoopMonitor _waitForIdleInterval:blockMonitoredThread:]
1 +[NSThread sleepUntilDate:]
1 __semwait_signal
1 __semwait_signal
57 ObjcParse::initializer()
35 ObjcParse::nextToken()
35 Cpp::nextToken()
35 Cpp::nextToken0()
31 Cpp::getInput(TokenBufferStream*, signed char)
29 Lex::nextToken()
28 Lex::lexNumberConstant(char)
13 StringTable::lookup(char const*, int)
13 StringTable::lookup(char const*, int)
9 Lex::lexNumberConstant(char)
6 TokenBuffer::allocToken(TokenType)
6 TokenBuffer::addToken(Token*)
6 TokenBuffer::addToken(Token*)
1 Lex::nextToken()
2 Cpp::getInput(TokenBufferStream*, signed char)
2 Cpp::putRelocToken(Token*)
2 TokenBuffer::addToken(Token*)
2 TokenBuffer::addToken(Token*)
1 Cpp::nextToken0()
1 TokenBuffer::addLargeToken(Token*)
1 TokenBuffer::addLargeToken(Token*)
21 ObjcParse::assignment()
21 ObjcParse::conditional()
21 ObjcParse::logicalOr()
21 ObjcParse::logicalAnd()
18 ObjcParse::bitwiseInclusiveOr()
17 ObjcParse::bitwiseExclusiveOr()
17 ObjcParse::bitwiseAnd()
17 ObjcParse::equality()
15 ObjcParse::relational()
15 ObjcParse::shift()
14 ObjcParse::additive()
14 ObjcParse::multiplicative()
13 ObjcParse::postfix()
13 ObjcParse::primary()
11 ObjcParse::nextToken()
10 Cpp::nextToken()
9 Cpp::nextToken0()
8 Cpp::getInput(TokenBufferStream*, signed char)
8 Lex::nextToken()
6 TokenBuffer::allocToken(TokenType)
5 TokenBuffer::addToken(Token*)
5 TokenBuffer::addToken(Token*)
1 TokenBuffer::allocToken(TokenType)
2 Lex::nextToken()
1 Cpp::nextToken0()
1 Cpp::handleAltivecContext()
1 Cpp::handleAltivecContext()
1 ObjcParse::nextToken()
2 PBXIndexCParseActions::doConstant(Token*)
2 PBXIndexCParseActions::doConstant(Token*)
1 ObjcParse::unary()
1 ObjcParse::unary()
1 Token::is_shiftOp()
1 Token::is_shiftOp()
1 ObjcParse::equality()
1 Token::is_relationalOp()
1 Token::is_relationalOp()
1 ObjcParse::bitwiseInclusiveOr()
3 ObjcParse::logicalAnd()
1 ObjcParse::initializer()
896 PBXIndexCParseActions::beginDeclaration(Token*, DeclarationContext)
896 TokenBuffer::tokenLine(Token*)
849 TokenBuffer::nextToken(Token*)
849 TokenBuffer::nextToken(Token*)
47 TokenBuffer::tokenLine(Token*)
1 ObjcParse::declarationSpecifiers(objc_object*, int*, int*, Token**)
1 ObjcParse::typeSpecifier(objc_object*)
1 PBXIndexCParseActions::addBasicType(objc_object*, Token*)
1 PBXIndexCritical::PBXIndexCritical(PBXProjectIndex*)
1 -[PBXProjectIndex beginCriticalSection]
1 -[XCRunLoopMonitor blockRunLoopAfterIdleInterval:]
1 -[XCRunLoopMonitor _waitForIdleInterval:blockMonitoredThread:]
1 +[NSThread sleepUntilDate:]
1 __semwait_signal
1 __semwait_signal
1867 Thread_2b03
1867 thread_start
1867 _pthread_start
1867 select$DARWIN_EXTSN
1867 select$DARWIN_EXTSN
1867 Thread_2c03
1867 thread_start
1867 _pthread_start
1867 __NSThread__main__
1867 -[NSThread main]
1867 -[NSUIHeartBeat _heartBeatThread:]
1867 -[NSConditionLock lockWhenCondition:]
1867 -[NSConditionLock lockWhenCondition:beforeDate:]
1867 -[NSCondition waitUntilDate:]
1867 pthread_cond_timedwait_relative_np
1867 _pthread_cond_wait
1867 semaphore_timedwait_signal_trap
1867 semaphore_timedwait_signal_trap


Total number in stack (recursive counted multiple, when >=5):
        7       _pthread_start
        7       thread_start
        5       __semwait_signal

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal        5603
        mach_msg_trap        3257
        semaphore_timedwait_signal_trap        2344
        select$DARWIN_EXTSN        1867
        TokenBuffer::nextToken(Token*)        1720
        TokenBuffer::tokenLine(Token*)        86
        TokenBuffer::addToken(Token*)        14
        StringTable::lookup(char const*, int)        13
        Lex::lexNumberConstant(char)        9
Sample analysis of process 1500 written to file /dev/stdout

_______________________________________________
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 eats 100% CPU and more while typing
      • From: "Bob Hansen" <email@hidden>
    • Re: Xcode eats 100% CPU and more while typing
      • From: William Bates <email@hidden>
  • Prev by Date: Re: Timing of Build Phases
  • Next by Date: Embed symbols in project window
  • Previous by thread: Re: Can I disable linking against the system malloc?
  • Next by thread: Re: Xcode eats 100% CPU and more while typing
  • Index(es):
    • Date
    • Thread