Hugo using all the system resources

Laptop HP EliteBook 840 G3
OS ArcoLinux
CPU i5-6300U
RAM 8GB
HUGO v0.116.1+extended linux/amd64

I was working today on my company website and like an hour ago my laptop started showing 99% CPU/Memory usage I couldn’t do anything. I had to force restart the laptop. the last it happened I couldn’t check what caused it. I resumed working but it just happened again and Hugo was using all the resources.

swappy-20230826_105240

I was running hugo server --watch --verbose --debug --noHTTPCache in the built vscode terminal. anyone got any ideas how to fix it or avoid this issue? I am willing to give any logs. nesscary

What happens it you run the command outside the vscode terminal? Does the problem persist?

I remember a discssion thread about slow build with vscode, this may or may not be related to your problem.

I did run in terminal but I haven’t faced the issue, but also I am working on this site from well over a month I never happened before, I always ran the cmd in vscode terminal.

Edit: I do have a lot of files in my theme dir it’s my first theme so Idk if I am building it right or not. I have about 340 files, including partials, and CSS, JS etc but I don’t have many images.