Files
flipper/static
Pascal Hartig 10559a188f Make yarn start twice as fast
Summary:
Compilation is a mixture of I/O and CPU work, so there's some good optimisation potential even on a single thread by running the promises concurrently. The downside is that the output is a bit garbled, but it's quite a bit faster for me.

To test this, I applied this diff so I could just `time yarn start` for an entire run.

```
 diff --git a/xplat/sonar/src/init.js b/xplat/sonar/src/init.js
 --- a/xplat/sonar/src/init.js
+++ b/xplat/sonar/src/init.js
@@ -80,4 +80,5 @@
   dispatcher(store, logger);
   // make init function callable from outside
   window.Flipper.init = init;
+  window.close();
 });
```

## Before

**Cold Start**
```
696.89user 93.21system 4:21.44elapsed 302%CPU (0avgtext+0avgdata 1111448maxresident)k
1416inputs+372824outputs (3major+28155897minor)pagefaults 0swaps
```

**Hot Start**
```
6.87user 1.62system 0:17.32elapsed 49%CPU (0avgtext+0avgdata 249264maxresident)k
216inputs+182912outputs (0major+251426minor)pagefaults 0swaps
```

## After

**Cold Start**

```
736.86user 95.47system 1:53.13elapsed 735%CPU (0avgtext+0avgdata 970616maxresident)k
42864inputs+356776outputs (42major+25299531minor)pagefaults 0swaps
```

**Hot Start**

```
6.85user 1.60system 0:15.93elapsed 53%CPU (0avgtext+0avgdata 269420maxresident)k
2592inputs+197904outputs (0major+260099minor)pagefaults 0swaps
```

## Summary

It's beneficial in both cases, but the wall clock time for cold start goes from *4:21.44* to *1:53.13* for me (mind that this is a single sample). This is a 2.3x speed-up!

Reviewed By: jknoxville

Differential Revision: D16359215

fbshipit-source-id: 62257ec3bdefbf98356f5ac9418c4906f7cb4b1b
2019-07-18 10:44:50 -07:00
..
2019-05-03 12:08:04 -07:00
2018-10-06 11:18:18 -07:00
2019-06-14 03:41:54 -07:00
2019-07-17 06:52:01 -07:00
2018-06-01 11:03:58 +01:00
2018-06-01 11:03:58 +01:00
2018-12-07 08:06:07 -08:00
2018-06-01 11:03:58 +01:00
2019-05-03 12:08:04 -07:00
2019-07-10 12:06:39 -07:00
2018-06-01 11:03:58 +01:00
2018-06-01 11:03:58 +01:00
2018-06-01 11:03:58 +01:00
2018-09-19 03:57:31 -07:00
2018-09-19 03:57:31 -07:00
2019-07-16 09:05:11 -07:00
2019-03-25 11:36:19 -07:00
2019-07-09 03:07:04 -07:00
2018-06-01 11:03:58 +01:00
2018-06-01 11:03:58 +01:00
2019-04-05 08:07:15 -07:00
2019-05-04 11:16:23 -07:00