ziishaned / livereload-vscode

LiveReload plugin for VS Code
MIT License
33 stars 7 forks source link

Performance issue #20

Open pavelloz opened 4 years ago

pavelloz commented 4 years ago

It looks like server is taking far too much CPU than it should.

I use chokidar regularly on projects with more files than this one and it doesnt hug nearly as much cpu.

Setting exts to only one extension (ie. erb) didnt help.

OS: macOS 10.14.6

Live action: https://youtu.be/yvJMz-YpRjM

pavelloz commented 4 years ago

I just run a test with native livereload straight from npm, and it doesnt have this issue:

livereload . -e "erb,js,css"

brocorp-dev commented 4 years ago

Hi guys,

we experienced the same issue on our hardware, huge CPU usage when LiveReload extension is started in VScode

Hardware

MacBook Pro 13" (2019), Core i5 1.4Ghz, 8Go RAM

OS

macOS Catalina 10.15.1

Software

VScode 1.41.1 + LiveReload extension 0.2.5 Chrome 78.0.3904.108 + LiveReload extension 2.1.0

with LiveReload enabled

Capture d’écran 2020-01-16 à 10 45 09

with LiveReload disabled

Capture d’écran 2020-01-16 à 10 46 14
we5 commented 4 years ago

Having the same issue and makes it nearly impossible to use without putting on the headphones and not complaining about the fan noise (400% CPU). The high CPU usage also stops immediately after disabling the LiveReload server

ofhouse commented 3 years ago

Made an update to the chokidar package (used internally for file watching) and after this the CPU-performance was normal again.

I made a Pull Request to update the dependency, if anyone needs a fix until a new version is released, you can download a Prerelease here: https://github.com/ofhouse/livereload-vscode/releases/tag/v0.3.0-rc.0