Skip to content
This repository has been archived by the owner on Jan 3, 2022. It is now read-only.

Build time or run time? #96

Open
windtalkerlv opened this issue Apr 26, 2019 · 4 comments
Open

Build time or run time? #96

windtalkerlv opened this issue Apr 26, 2019 · 4 comments

Comments

@windtalkerlv
Copy link

windtalkerlv commented Apr 26, 2019

First thank you for organizing this collective effort.
I want to ask that if we're using the build time with ⌘+B showed by Xcode by sudo defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES ? I think this is a better bench compare to ⌘+R because people might be launching different simulators(for example I am running iPad pro 21.9 3rd Gen). I think different simulators might launch in different timeframe. Also the Xcode build time shows more accuracy, to the 3rd decimals , compare to a stopwatch. For example my build time is 16.641s, 17.478s in 2 tests, compare to when app shows in simulator which is around 27s with stopwatch.
I will submit a pr with the correct number after your response.

@ashfurrow
Copy link
Owner

Hey, that's a good point about the simulator. The readme here should specify which to use. I when with ⌘-R because it represents real-world use cases, and I went with a stopwatch because I don't want this repo to have (or appear to have) scientific accuracy. This is all supposed to be relative measurements. I'll amend the readme with new instructions, do you want to submit the build time using an iPad Air 2, iOS 12?

@windtalkerlv
Copy link
Author

windtalkerlv commented Apr 29, 2019

After using your parameter I got 27 seconds fresh build and 7 seconds incremental.
macOs 10.14.4
Xcode 10.1
9700K 5.0 GHz
16GB 3000MHz
Adata sx8200 960GB
Should I do a pr?

@paulz
Copy link
Contributor

paulz commented Feb 29, 2020

I am thinking, if including simulator launch time is worth including?
During my workflow, I usually have the simulator already launched and just start the app after a change. Do people restart the simulator app for incremental builds?

Updated my stats to include simulator restart and I see it takes about 30% of the measured time:
#119

So it looks like total time consists of

  1. build
  2. launch simulator app
  3. launch simulator device
  4. launch the app

Most of the time I am noticing me waiting is for:

  1. build
  2. runs tests that sometimes launch the app on the simulator.

Usually, I already have the simulator app and simulator device running on the machine.

@ashfurrow
Copy link
Owner

Definitely. That's why the readme instructions say the incremental build should have the simulator already running:

"Incremental" builds represent a more common use case: changing one file and recompiling with the simulator already running.

This kind of gives a lower and upper bound for the machine. The longest you'd have to wait (for everything to happen) and the shortest you could expect to wait (a single change re-running in an active sim).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants