apache / apache/cordova-cli

Improve startup speed/performance of CLI

Open
#406 11 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.