xc-launch icon indicating copy to clipboard operation
xc-launch copied to clipboard

Timings

Open wolffan opened this issue 8 years ago • 3 comments

I've done some experiments.

Using the script and the ramdisk on the derived data folder compile time is over 8 minutes. Using the normal config compile time is under 5 minutes.

This seems quite a high price to pay for using this.

I don't really know how to check the disk usage, the tools from Mac OS don't give much clue...

Thanks for the script :). I hope this bit of info is useful!

Raimon

wolffan avatar Jun 22 '17 09:06 wolffan

Hi @wolffan, thanks for this report. 👍

So in your experience using the script result in longer build times?

How much RAM memory do you have? Maybe the memory pressure introduced by the script (default is 4GB RAM drive) makes your Mac do more swapping. Or maybe you compiled first in memory, then in disc and magically something got cached. (Can be Core Data generated code already there?)

Love to hear more details about the experiment: Xcode version, code you were compiling (Swift / Objective-C), if external dependencies were involved (CocoaPods) and if you have a link to a public to replicate it.

Besides raw speed, other reasons for using this script are:

  • less workload on your SSD which should expand its lifetime (I hope at least, yes, very scientific)
  • no more files tucked under obscure folders, taking up a lot of space in your SSD. When you unmount this RAM drive, everything is gone!

It would be a good idea to benchmark it using some test projects...

dfreniche avatar Jun 22 '17 11:06 dfreniche

The machine is MacBook 2015 with 16 GB of ram. Xcode 8.3.3 Project is mainly swift at 96% (there are pods in the project, 6) The project is not public :(

The experiments where done with the clean project and derived data folder deleted (I use Watchdog for this). So in theory both builds should be exactly equal.

Yup using the script it takes longer to compile :( I looked at System Monitor to see changes on disk, but really not very familiar with it. So I can't evaluate the use of disk.

I did the experiment twice, and times vary some seconds but they are still on those ranges (for that project).

If you're looking into projects maybe having the artsy could work?

wolffan avatar Jun 22 '17 12:06 wolffan

I will be testing it tomorrow with Xcode 9, so far I've noticed higher CPU usage. I've 2014 MacBook Pro "15, with 16GB ram and i7 2,8 Ghz. I wouldn't dare to try it on my smaller MacBook 13" though.

sxcore avatar Sep 07 '17 21:09 sxcore