question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve startup speed/performance of CLI

See original GitHub issue

Even with telemetry turned off, 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 😉 )

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
janpiocommented, Apr 11, 2019

Renamed to a task that benefits of both the measurements and your analysis.

1reaction
raphinessecommented, Apr 10, 2019

I did some profiling and about half of the time is spent by require('insight'). When you drill down a bit, you can see that the actual culprit that causes the long loading time is Rx.js which is required by inquirer, a dependency of insight.

Roughly the other half is spent on loading cordova-lib. There’s a few things I wanted to do about that for some time, but I haven’t gotten to it. The Problem with improving the loading time there is that a lot of modules require way more than they would have to. I have some WIP to improve that, but it’s quite some work since test doubles are affected when changing requires etc.

My times for cordova -v are as follows:

  • cordova@latest: 1050 ms
  • Without loading insight: 700ms
  • Without loading insight and cordova-lib: 190ms
  • Running an empty bin/cordova: 100ms
Read more comments on GitHub >

github_iconTop Results From Across the Web

Speed up Windows 10 with One Command - YouTube
... Running the Command to Debloat Windows 10 05:38 Pre-Debloat Processes and Performance 06:08 First Boot after running the script 07:24 ...
Read more >
How to Speed Up Windows 10 - Top Tips to Improve your PC ...
Restart Regularly to Improve Windows 10 Performance · Press Win + R to open Run, type cmd , and press Enter to open...
Read more >
Improve the Boot Speed of Your Windows 10 - Easytutorial
Boost Your PC by Disabling Startup Services​​ That is accessed using the command msconfig in Run. Click on the “Services” tab and check...
Read more >
Improving performance/Boot process - ArchWiki - Arch Linux
Improving the boot performance of a system can provide reduced boot wait times and serves as a means to learn more about how...
Read more >
Chapter 18. Optimizing systemd to shorten the boot time
Service name Can it be disabled? More information auditd.service yes dbus‑org.fedoraproject.FirewallD1.service yes A symlink to firewalld.s... dbus‑org.freedesktop.NetworkManager.service yes A symlink to NetworkM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found