• 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 3 vs SCM vs Project Root vs LARGE code base
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode 3 vs SCM vs Project Root vs LARGE code base


  • Subject: Xcode 3 vs SCM vs Project Root vs LARGE code base
  • From: Matt Gough <email@hidden>
  • Date: Tue, 30 Oct 2007 18:39:28 +0100

There have been several posts recently to do with SCM in Xcode 3 that have helped me figure out a major problem with Xcode 3 when used with large code bases.

(My definition of large in this case is somewhat arbitrary, but in my case I would hazard a guess that our code base is a large as say that of Microsoft Office or Adobe's Creative Suite.)

A couple of days ago, I posted the following:

***
* Perforce vs Xcode 3 => 100% cpu usage *

I have set up my Xcode 3.0 projects to use Perforce.

Now whenever I open such a project the cpu usage goes up to 100% and stays there indefinitely.

In Xcode's Activity Viewer I get an entry as follows:

SCM Operation
1 operation pending

This cannot be cancelled.

***



Yesterday, David Dunham posted this:

***

* Project Root and SCM *

Our folder layout looks something like

games
	library1
	library2
	game1
	game2
	...
	game50

When we build one game, we obviously don't need to worry about the source for the other 49.

When I set project root to "games" the SCM Results fills up with all the games I'm not building. If I set project root to "game2" then Xcode gives me no SCM access to library1 and library2.

Is there a way to have a clean SCM Results but still be able to check all relevant files in and out?

***



Thanks to David's post I then revisited my problem with the 100% cpu usage, as the overall hierarchy he uses is similar (but much smaller) to ours (one top level folder with many sub-folders for different projects/libraries etc)

It turns out that the pending SCM operation does actually finish if I leave it long enough (about 40 mins), at which point Xcode stalls for maybe two minutes and then eventually crashes. I see now what is happening:

I too had set my Project Root to be the top level folder of our entire repository. For some bizarre reason in Xcode 3, Apple decided that instead of getting the SCM state of each file actually added to the xcodeproj (as they do in Xcode 2.x), they would get the state of EVERYTHING from Project Root down, even if not used by the current project. As such, (in my case) it dutifully gathers up information on about 50,000 files, runs out of memory and then crashes (Stack trace at end of email)

So it seems the only way to avoid this is to be more granular about where Project Root is. Then though we hit David's problem of not being able to SCM any of the files in the various library folders etc. I also imagine Project Root is used for other useful stuff (like maybe finding or the Code Sense stuff?)

What is also annoyingly dumb, is that if multiple Xcode projects use the same Project root, then Xcode does duplicate SCM operations for each project that you open instead of realising that they must all share the same SCM state. This really brings everything to a crawl for the few brief minutes before it crashes:(

I don't know there is much Apple can do about this apart from revisting how SCM operations get done, so in the meantime I will just have to fine-tune the Project root in the 30 projects I use.

I should mention that in my case I am using Perforce, but I would guess that any SCM system will cause the same problems in similar circumstances.




Matt Gough

Agfa Graphics



0 libSystem.B.dylib 0xffff08b7 __memcpy + 279
1 libobjc.A.dylib 0x9051713e fixupSelectorsInMethodList + 99
2 libobjc.A.dylib 0x90518426 _class_getMethodNoSuper + 150
3 libobjc.A.dylib 0x9050e4fe _class_lookupMethodAndLoadCache + 182
4 libobjc.A.dylib 0x9051e736 objc_msgSend + 102
5 com.apple.Foundation 0x901ca3f0 _NSOutOfMemoryErrorHandler + 64
6 com.apple.CoreFoundation 0x95a92281 __CFStringChangeSizeMultiple + 1985
7 com.apple.CoreFoundation 0x95a92996 __CFStringAppendBytes + 758
8 com.apple.CoreFoundation 0x95a9bb3c _CFStringAppendFormatAndArgumentsAux + 2220
9 com.apple.CoreFoundation 0x95a9d548 _CFStringCreateWithFormatAndArgumentsAux + 120
10 com.apple.Foundation 0x90079b26 -[NSPlaceholderString initWithFormat:locale:arguments:] + 86
11 com.apple.Foundation 0x900b9238 -[NSString initWithFormat:arguments:] + 56
12 com.apple.CoreFoundation 0x95af0009 +[NSException raise:format:arguments:] + 89
13 com.apple.CoreFoundation 0x95af008a +[NSException raise:format:] + 58
14 com.apple.Foundation 0x9006cc1d NSAllocateObject + 237
15 com.apple.Foundation 0x9006fb26 +[NSPathStore2 pathStoreWithCharacters:length:] + 70
16 com.apple.Foundation 0x9006ec69 - [NSString(NSPathUtilities) _stringByStandardizingPathUsingCache:] + 217
17 com.apple.Foundation 0x9006eb8a - [NSString(NSPathUtilities) stringByStandardizingPath] + 42
18 com.apple.AppKit 0x961c8667 -[NSDocument _isLocatedByURL:withCache:] + 291
19 com.apple.AppKit 0x96197ca6 -[NSDocumentController _documentForURL:] + 140
20 ...ple.Xcode.DevToolsInterface 0x00bc455b +[PBXFileDocument _referenceDidChangeSCMState:] + 147
21 com.apple.Foundation 0x9007467a _nsnote_callback + 106
22 com.apple.CoreFoundation 0x95a57a4a __CFXNotificationPost + 362
23 com.apple.CoreFoundation 0x95a57d23 _CFXNotificationPostNotification + 179
24 com.apple.Foundation 0x90071a70 -[NSNotificationCenter postNotificationName:object:userInfo:] + 128
25 com.apple.Xcode.DevToolsCore 0x0075bc0a -[XCSCMInfo sendStateChangeNotificationForReference:inProject:] + 235
26 com.apple.Xcode.DevToolsCore 0x00763872 -[XCSourceControlManager finishRequest:] + 842
27 com.apple.Xcode.DevToolsCore 0x007d131d -[SCMRequest reportCompletionWithCode:] + 48
28 com.apple.Xcode.DevToolsCore 0x007dab71 -[SCMModel handleFinishedRequest:] + 502
29 com.apple.Xcode.DevToolsCore 0x007cfeac -[SCMSandbox handleFinishedRequest:] + 148
30 com.apple.xcode.perforce 0x0a2b35e4 extractPerforceRevisionFromMessage + 5546
31 com.apple.Xcode.DevToolsCore 0x007d1404 -[SCMRequest reportFinished] + 143
32 com.apple.Xcode.DevToolsCore 0x007dcc32 -[SCMManager handlePortMessage:] + 1419
33 com.apple.Foundation 0x900af063 __NSFireMachPort + 339
34 com.apple.CoreFoundation 0x95a525c5 __CFMachPortPerform + 117
35 com.apple.CoreFoundation 0x95a76941 CFRunLoopRunSpecific + 3921
36 com.apple.CoreFoundation 0x95a76d38 CFRunLoopRunInMode + 88
37 com.apple.HIToolbox 0x90c6d8a4 RunCurrentEventLoopInMode + 283
38 com.apple.HIToolbox 0x90c6d6bd ReceiveNextEventCommon + 374
39 com.apple.HIToolbox 0x90c6d531 BlockUntilNextEventMatchingListInMode + 106
40 com.apple.AppKit 0x95eb7d5b _DPSNextEvent + 657
41 com.apple.AppKit 0x95eb76a0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
42 com.apple.AppKit 0x95eb06d1 -[NSApplication run] + 795
43 com.apple.AppKit 0x95e7d9ba NSApplicationMain + 574
44 com.apple.Xcode 0x00001fc6 0x1000 + 4038



_______________________________________________ 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
  • Prev by Date: Re: Return in dialogs
  • Next by Date: Re: More options for Smart Groups (writable files, changed today...) ?
  • Previous by thread: Re: Does Xcode 3 svn support existing sandboxes?
  • Next by thread: Re: Xcode 3 vs SCM vs Project Root vs LARGE code base
  • Index(es):
    • Date
    • Thread