Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes sharkdp#310, and provides a start for sharkdp#306. This improves the startup time on my machine significantly. I'll let the benchmark results speak for themselves: Before commit: | Command | Mean [ms] | Min [ms] | Max [ms] | Relative | |:---|---:|---:|---:|---:| | `Startup time (insect '1+1')` | 513.9 ± 24.4 | 496.4 | 581.2 | 1.00 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative | |:---|---:|---:|---:|---:| | `Startup time, stdin mode (insect < computations-1.ins)` | 535.5 ± 14.2 | 524.6 | 572.7 | 1.00 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative | |:---|---:|---:|---:|---:| | `Evaluation speed (insect < computations-160.ins)` | 1502.1 ± 42.4 | 1466.2 | 1580.7 | 1.00 | After commit: | Command | Mean [ms] | Min [ms] | Max [ms] | Relative | |:---|---:|---:|---:|---:| | `Startup time (insect '1+1')` | 192.4 ± 18.5 | 185.4 | 259.1 | 1.00 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative | |:---|---:|---:|---:|---:| | `Startup time, stdin mode (insect < computations-1.ins)` | 208.1 ± 2.0 | 204.8 | 212.2 | 1.00 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative | |:---|---:|---:|---:|---:| | `Evaluation speed (insect < computations-160.ins)` | 1153.0 ± 17.6 | 1136.6 | 1198.3 | 1.00 | Also, this commit causes `output` to not be published to NPM, which makes for a much smaller installation size: Insect 5.7.0 on NPM has an unpacked size of 29.2 MBs, but `npm publish --dry-run` with this commit reports 378.8 kB. `.npmignore` was also removed, as the `files` property in `package.json` includes only the files we want, so `.npmignore` does basically nothing. Read https://docs.npmjs.com/cli/v8/configuring-npm/package-json/#files for more information. This commit additionally makes a small modification to `index.js` to make it work with Node 12. Unfortunately, at least one of our dependencies (`clipboardy`) does not support Node 10, so I could not make `index.js` work with Node 10.
- Loading branch information