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.

Watch is very slow to recognize file modifications

See original GitHub issue

This seems to be a common problem for me, but I haven’t been able to find any issues about posted about it. Maybe I’m just doing something wrong.

When I’m developing, it frequently takes the watch task 5-15 seconds just to recognize that a file was modified. Once the task actually starts, everything execute quickly, but the problem is triggering the watch task so it notices my file modifications. This makes development much slower than manually calling a particular task. Here’s my very simple watch task:

gulp.task('less', function() {
    return gulp.src(paths.less)
        .pipe(gulpless())
        .pipe(gulp.dest('./public/css/tmp'));
});

gulp.task('watch', function() {
    gulp.watch(paths.less, ['less']);
});

Is this normal behavior? If so, is there anything I can do to speed up the file modification recognition? If not, how can I benchmark what’s taking so long?

Issue Analytics

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

github_iconTop GitHub Comments

29reactions
rpullingercommented, May 21, 2014

@swvjeff,

Bit late to the party but I solved a similar issue by updating the synced folder options in my vagrantfile.

config.vm.synced_folder "dev", "/dev/vagrant",
    :nfs => true,
    :mount_options => ['actimeo=2']

By adding the 'actimeo=2' I got the updates to happen almost instantly.

Hope it helps, Rich.

0reactions
devantoinecommented, Mar 7, 2019

Erf, I don’t understand why this is not working for me 😕

172.28.128.1:/Users/antoinedes/Dev/Projects/foobar on /vagrant type nfs (rw,vers=3,udp,actimeo=2,addr=172.28.128.1)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why there is a delay in detecting a file change using ...
I want the time taken to detect a file to be minimal and consistent, taking more than a second is very expensive. Any...
Read more >
SourceTree is very slow to detect changes in local repositories
I'm finding that SourceTree is very slow to detect changes (e.g., files that have been edited then saved) in my local repositories.
Read more >
Slow webpack watch execution and webapp not getting ...
I'm using IntelliJ IDEA 2021.2.3 (Ultimate Edition) - Windows 10 OS. When running webpack watch command in IntelliJ the changes are noted, and ......
Read more >
Troubleshooting issues related to playback and performance ...
If you have issues with slow rendering, try changing the Renderer. Select File > Project Settings > General > Renderer and change the...
Read more >
Watch and WatchOptions | webpack
Webpack can watch files and recompile whenever they change. ... If this value is too low, the file watcher in Webpack won't recognize...
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