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.

Extreme High CPU Usage

See original GitHub issue

I am using Windows 7 64bit on AMD Phenom II X4 955 Processor PC and I try to run browser-sync using gulp.

    var gulp = require('gulp');
    var browserSync = require('browser-sync');
    gulp.task('browser-sync', function() {
    browserSync({
        server: {
            baseDir: "public"
        },
        files: "public/**",
        notify: false,
        browser: "chrome"
    });
    });

The problem is as soon as i run browser-sync, I see high CPU usage of about 60-70% on all 4 cores of CPU on node.exe all time. Do you experience such problem as well? Why is it run at such a high usage? Is there anyway to reduce it?

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
almonecommented, Jan 25, 2016

I also faced with high CPU usage problem when tried to watch all my project files like so: gulp.watch('**/*.*', ['js']);dont use this! So the solution for me was to only watch the files that are changed regularly. Thanks to @christianv http://denbuzze.com/post/5-lessons-learned-using-gulpjs/

1reaction
shakyShanecommented, Feb 17, 2015

Why is it run at such a high usage? Is there anyway to reduce it?

Yeah, you need to be more specific with your file-watching. Instead of "public/**" try narrowing it down and exclude all vendor directories (such as bower_components, etc)

browserSync({
        server: {
            baseDir: "public"
        },
        files: ["public/js/*.js", "public/css/*.css"],
        notify: false,
        browser: "chrome"
    });

etc, etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is CPU usage, and how to fix high CPU usage
How to fix high CPU usage · Restart your computer · Check open processes · Scan your computer for viruses and malware ·...
Read more >
How to Fix High CPU Usage (with Pictures) - wikiHow
1. Press .Ctrl+ Shift+Esc to open the Task Manager. This is a utility that monitors and reports on all of the processes and...
Read more >
How to Fix High CPU Usage in Windows - AVG
1. Identify the process that's causing 100% CPU usage · 2. Close unnecessary applications or put them sleep · 3. Give your PC...
Read more >
How to Lower CPU Usage: Common Causes & Tips - N-able
The symptoms of high CPU usage are familiar: the cursor moves jerkily and slowly, and applications begin to lag or shut down.
Read more >
[SOLVED] How to fix CPU usage 100% issue - Driver Easy
Try these fixes · Fix potential Windows stability issues · End the processes that consume lots of CPU resources · Update your drivers...
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