vale-vscode icon indicating copy to clipboard operation
vale-vscode copied to clipboard

Add option to limit CPU use to avoid the noisy fan (on Macbook pro)

Open universemaster opened this issue 2 years ago • 3 comments

  • Is there a possibility of an option to limit CPU use?

    • On a 2014 Macbook pro when I use vale with the vscode extension, vale briefly spikes to above 200% fan use while I type, which turns on the noisy fan and makes visual updates (markdown preview etc) lag a bit.

    • I wonder if there could be an option to limit the CPU usage of vale?

    • I have very very many rules, which I'm reluctant to trim, because apart from the fan noise, I find these many rules a net benefit.

  • Another idea (on the vscode extension side) would be to "debounce" so that rather than running immediately on each key-press, vale is fired only after a pause of say 5-10 seconds? Again this could be configurable?

  • Finally, again on the vscode extension side, I suspect vscode is sending the entire file to vale on each key press? Would it be realistic to send only the part (paragraph?) that has changed. I've notice the CPU/noise problem becomes much worse, the longer the document?

universemaster avatar Feb 12 '23 17:02 universemaster

Sounds like most of this is for https://github.com/errata-ai/vale-vscode

nschonni avatar Feb 12 '23 17:02 nschonni

Sounds like most of this is for https://github.com/errata-ai/vale-vscode

OK, do you really suggest I create an issue there, too? Seems a bit messy to create two? I was under the impression errata-ai was quite a small organisation?

universemaster avatar Feb 12 '23 17:02 universemaster

Finally, again on the vscode extension side, I suspect vscode is sending the entire file to vale on each key press? Would it be realistic to send only the part (paragraph?) that has changed. I've notice the CPU/noise problem becomes much worse, the longer the document?

This was an option in a previous version:

https://github.com/errata-ai/vale-vscode/blob/4c4698fad59c201fb3d504ba62bf0e5a28e756fd/package.json#L119

It should probably be re-introduced since it wasn't really dependent on Vale Server.

jdkato avatar Feb 13 '23 01:02 jdkato