sveltejs/sapper

Dev server hot reloading makes Macbook fans spin like crazy

Closed this issue · 3 comments

Whenever I'm in dev mode and make a change the recompilation makes my Macbook Pro 13 2020 fans immediately spin up. This seems like some inefficency with svelte/sapper HMR since I haven't got that issue in react or elsewhere.

You can see what Sapper is doing here: https://github.com/sveltejs/sapper/blob/master/src/core/create_app.ts
And then called here:

this.filewatchers.push(

You could start by putting some timers before and after generate_client_manifest, generate_server_manifest, generate_app, create_serviceworker_manifest, etc. to see if there's a part that particularly taking awhile for you

IAL32 commented

I am having the same problem here.

image

It looks like the problem is in the service-worker.js file.

I have a Ryzen 7 4700U with 16GB of RAM, and it's using 50% of the CPU 🐙

Edit: it all went back to normal when I killed that process. I am doing an investigation on how to reproduce it, because I had this problem once before.

I wouldn't worry too much about this for now. We're in the process of totally replacing the dev workflow.

Happy for you to keep investigating, but don't spend too much time on it.