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.

Extremely slow start up on Windows

See original GitHub issue

yarn rw dev on my Dell XPS 15 9550 (16 GB ram) running Windows 10 is extremely slow. Other Windows users seems to be reporting similar problems on our Discord server.

So I added some timing logs to the dev cli command, and this is what I got

dev.js::handler() base time Sun, 19 Jul 2020 00:04:27 GMT
DB startup. Delta: 0.003 sec
Shutting down "api" side. Delta: 0.066 sec
Shutting down "web" side. Delta: 100.539 sec
Starting everything. Delta: 693.201 sec
dev.js::handler() base time Sun, 19 Jul 2020 00:26:20 GMT
DB startup. Delta: 0.002 sec 
Shutting down "api" side. Delta: 0.068 sec
Shutting down "web" side. Delta: 146.419 sec
Starting everything. Delta: 392.674 sec
dev.js::handler() base time Sun, 19 Jul 2020 00:34:38 GMT
DB startup. Delta: 0.003 sec
Shutting down "api" side. Delta: 0.076 sec
Shutting down "web" side. Delta: 579.419 sec
Starting everything. Delta: 1253.326 sec

Clearly what’s taking time is shutting down stuff. Actually starting the dev server only takes 3 - 4 seconds (timing not shown above). That last one in particular is horrible, with 21 minutes to just shutting everything down. I almost gave up several times, thinking it had crashed or frozen.

So the question then becomes, how do we make it shut down stuff faster, not how do we make it start faster.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
Tobbecommented, Jul 19, 2020

kill-port 1.6.0 was using netstat -ao

$ time netstat -ao

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            XPS9550:0              LISTENING       1176
  TCP    0.0.0.0:445            XPS9550:0              LISTENING       4
  TCP    0.0.0.0:5040           XPS9550:0              LISTENING       8640
  [...]

real    4m12.881s
user    0m0.000s
sys     0m0.015s

kill-port 1.6.1 is using netstat -aon

$ time netstat -aon

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1176
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:5040           0.0.0.0:0              LISTENING       8640
  [...]

real    0m0.899s
user    0m0.000s
sys     0m0.031s

From 4m13s to 1s!

1reaction
Tobbecommented, Jul 19, 2020

yarn rw dev with latest version of kill-port

dev.js::handler() base time Sun, 19 Jul 2020 10:51:15 GMT
DB startup. Delta: 0.003 sec
Shutting down "api" side. Delta: 0.08 sec
Shutting down "web" side. Delta: 0.224 sec
Starting everything. Delta: 0.345 sec

1253.326 sec (previous worst-case) to 0.345 sec 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

8 Ways to Fix Slow Boot Times in Windows 10 - MakeUseOf
1. Disable Fast Startup ... One of the most problematic settings that will cause slow boot times in Windows 10 is the fast...
Read more >
How to Fix Slow Startup on Windows 10 | SoftwareKeep
Method 1: Disable Fast Startup · Method 2: Disable processes with high startup impact · Method 3: Make adjustments to your virtual memory...
Read more >
Fix the Windows 10 Slow Boot Issue: 9 Easy Solutions
1. Use the Windows 10 Startup Manager · 2. Update your BIOS · 3. Update your graphics card drivers · 4. Run the...
Read more >
Solved: Windows 10/11 Slow Boot [2022 Guide] - Driver Easy
Method 1: Disable Fast Startup ... The first quick and easy method to solve the problem is to disable Fast Startup on your...
Read more >
Full Guide to Fix Windows 10 Slow Boot After Update - EaseUS
Tip 1. Run Windows Defender; Tip 2. Disable Unnecessary Startup Programs; Tip 3. Defragment Computer Hard Drive; Tip 4. Run System File Checker ......
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