• 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: PBXNumberOfParallelBuildSubtasks and Xcode4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PBXNumberOfParallelBuildSubtasks and Xcode4


  • Subject: Re: PBXNumberOfParallelBuildSubtasks and Xcode4
  • From: Andreas Grosam <email@hidden>
  • Date: Thu, 21 Apr 2011 11:01:05 +0200

On Apr 20, 2011, at 8:47 PM, Joar Wingfors wrote:

>
> On 20 apr 2011, at 01.52, Serge MONTAIGU wrote:
>
>> Thank you for IDEBuildOperationMaxNumberOfConcurrentCompileTasks !!!
>> Setting this number to 12 speeds up the compile time dramatically (from 40 mn to 4 mn !!) but I will buy more memory to upgrade my machine to 16Gb.
>
>
> Please note that "virtual CPUs" are less efficient than physical CPUs. You'll probably see a bit of performance improvement if you add enough RAM to run 24 concurrent compiles, but don't expect it to be anywhere near 2x. The money *might* be better spent on an SSD. If you can benchmark ahead of time, try it out before you commit to getting the additional RAM. Just as a FYI.
>
> That said, getting more RAM is almost always a good decision...

On my MacBookPro5,1 with 4GB RAM installed, compiling a one file C++ console app which includes a bunch of boost headers, and a prefix header this happens:

PID    COMMAND      %CPU  TIME     #TH  #WQ  #POR #MREG RPRVT  RSHRD  RSIZE
16355  clang        38.5  00:10.49 1/1  0    14   704   882M+  11M    1094M+
16357  clang        97.3  00:04.11 1/1  0    14   729+  530M+  6928K+ 707M+
15669  Xcode        0.4   86:40.93 16   10   261- 973-  91M-   67M    242M-

That is, Xcode spawns two clang processes. Due to this, the Free Mem goes to nearly zero and the system stalls. Compiling this including compiling the prefix header takes roughly 50 seconds (measured watching the system clock in the menu bar, so not terrible accurate).

Launching clang on the console, even when Xcode is running at 100%, trying desperately to index and consuming lots of mem and CPU,
PID    COMMAND      %CPU      TIME     #TH  #WQ  #POR #MREG RPRVT  RSHRD  RSIZE
15669  Xcode        99.8      01:41:47 14/1 7    241  1323+ 476M+  67M    881M+

this takes:

$ time /Xcode4/usr/bin/llvm-g++ -arch x86_64 main.cpp -o test -I/opt/local/include
real	0m7.777s
user	0m6.896s
sys	0m0.708s

That is, it takes about 8 seconds.

So, good to know about IDEBuildOperationMaxNumberOfConcurrentCompileTasks. :/

Yes, clang and Xcode is truly awesome, but still needs a lot of polish (and a couple of fixes).
Will file a bug report with a bunch of more info.


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

References: 
 >PBXNumberOfParallelBuildSubtasks and Xcode4 (From: Serge MONTAIGU <email@hidden>)
 >Re: PBXNumberOfParallelBuildSubtasks and Xcode4 (From: Joar Wingfors <email@hidden>)
 >Re: PBXNumberOfParallelBuildSubtasks and Xcode4 (From: Serge MONTAIGU <email@hidden>)
 >Re: PBXNumberOfParallelBuildSubtasks and Xcode4 (From: Joar Wingfors <email@hidden>)

  • Prev by Date: Re: PBXNumberOfParallelBuildSubtasks and Xcode4
  • Next by Date: XCode 4.0 text cursor color
  • Previous by thread: Re: PBXNumberOfParallelBuildSubtasks and Xcode4
  • Next by thread: Xc4 as default?
  • Index(es):
    • Date
    • Thread