devloco / create-react-wptheme

Create modern, React-enabled WordPress themes with a single command.
MIT License
359 stars 60 forks source link

Freezing everything on windows 10 #50

Closed karanmandal closed 4 years ago

karanmandal commented 4 years ago

File-watcher is consuming too much disk also freezing everything, I tried by configuring, interval and binary Interval to 2000, but still, it starts hanging after some time.

user.dev.json

{
     "fileWatcherPlugin": {
          "touchFile": "./public/index.php",
          "ignored": "./public/index.php",
          "watchFileGlobs": [
               "./public/**/*.js",
               "./public/**/*.css",
               "./public/**/*.php"
          ],
          "interval": 2000,
          "binaryInterval": 2000
     },
     "wpThemeServer": {
          "enable": true,
          "host": "127.0.0.1",
          "port": 8090,
          "sslCert": null,
          "sslKey": null
     },
     "injectWpThemeClient": {
          "override": null,
          "file": "./build/index.php"
     }
}
devloco commented 4 years ago

@karanmandal,

Yikes! Can you provide any more details?

Thanks for reporting the bug and my apologies for the hassle.

devloco commented 4 years ago

@karanmandal,

I just realized that you put "Windows 10" in the Subject. Thanks.

devloco commented 4 years ago

Hi @karanmandal,

I just published a new version of the utils package. All it does is set polling to "false" by default. According to the chokidar README, that can cause "high CPU utilization."

If that doesn't help you out, you should look at these chokidar options:

Also, I wasn't able to reproduce this on my dev machine. If you provide enough details on your setup, then I can try again. I don't mind abandoning chokidar for something else. But I'd need to be able to test it all myself.

I hope that helps. Good luck!

devloco commented 4 years ago

Hi @karanmandal,

Since I was unable to reproduce this and so much time has gone by, I am going to close this. If you're able to instruct me to create a reproducible scenario, then feel free to reopen it. And I'll take a look then.

Thanks.