Improve startup speed/performance of CLI
- Dominant language
- JavaScript
- Stars
- 967
- Forks
- 344
- Avg merge
- 8h 41m
- Merged PRs (30d)
- 9
Description
[Even with telemetry turned off](https://github.com/apache/cordova-cli/issues/405), our CLI seems a bit slow sometimes:
```
C:\Users\Jan>cordova -v | gnomon
1.1532s 8.1.2 (cordova-lib@8.1.1)
0.0014s
Total 1.1572s
C:\Users\Jan>node -v | gnomon
0.0116s v10.15.1
0.0010s
Total 0.0135s
C:\Users\Jan>npm -v | gnomon
0.6859s 6.4.1
0.0016s
Total 0.6893s
C:\Users\Jan>ngrok -v | gnomon
0.0131s ngrok version 2.2.8
0.0017s
Total 0.0157s
```
(Yes, I am working on a not very powerful machine here)
(`ionic` is even slower with >7 seconds - but that's no excuse ;) )
Contributor guide
Research direction
Reproduce the reported `cordova -v` timing on a comparable machine and compare it with the `node`, `npm`, and `ngrok` timings shown in the issue. Trace the CLI startup path to identify the source of the delay; done means startup is measurably faster without telemetry enabled and the existing version output still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100