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.

Is watch supposed to be so slow?

See original GitHub issue

I’m using the example code from the README and watching a directory with only three files in it. When I make a change to one of the files it’s taking anywhere between 1 and 4 seconds to report. When I simply use fs.watch the change is reported almost immediately.

Is this expected? If not, do you have any idea what might be causing the slowness?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
TYRONEMICHAELcommented, Sep 30, 2015

Ok so I think I found the issue. Comparing wr vs watch, the issue is the difference between fs.watch & and fs.watchFile. To quote the Node docs:

fs.watch is more efficient than fs.watchFile and fs.unwatchFile. fs.watch should be used instead of fs.watchFile and fs.unwatchFile when possible.

Also this link provides good insight to the difference between the two methods link

0reactions
levithomasoncommented, Jun 14, 2016

I recently merged an update that sped things up quite a bit. Can you post your version numbers?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Watch Running Fast or Slow - Here are the Most ... - Montredo
Anytime when your watch is running fast or slow, it is advisable to see a watchmaker and let them diagnose the cause for...
Read more >
Automatic Watch Running too Fast or Slow? Here's What to do
Automatic watches will run approximately +/- 10 seconds per day in worst-case scenarios. The amount the watch will run too fast or slow...
Read more >
I can not seem to wear a watch without having it slow down ...
Here are some causes to make a watch slow: • The movement was poorly serviced. • Damage caused the dial to move and...
Read more >
Apple Watch too slow? 15 tips to speed up your ... - iGeeksBlog
To fix Apple Watch too slow, 1. Restart Watch, 2. Don't keep too many apps open in the dock, 3. Reduce Motion, 4....
Read more >
10 REASONS WHY THE SLOW WATCH IS TRULY SLOW
1. THE CORE IS THE UNIQUE SLOW 24 HOUR ONE-HAND CONCEPT. · 2. AS THE HAND TURNS ONLY ONCE EVERY 24 HOURS INSTEAD...
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