I started a small Next.js project two weeks ago, just a landing page and
a contact form. Nothing fancy, no database, maybe eight components in total and a few
images from my phone gallery. Yesterday I opened Task Manager while the dev server was
running and saw it sitting at almost 6GB. My laptop has 8GB total, so
the browser tabs and everything else were fighting for whatever was left. The fan starts
spinning the moment I save a file, and it stays loud for about a minute.
Hot reload takes four or five seconds now, when it used to be instant
in the first week. I am working from my bedroom in Tolichowki and the room
gets warm by afternoon anyway. By evening the keyboard itself feels hot, which is not
something I enjoy when I am typing for hours. I have already tried deleting the
node_modules folder and installing everything again, and it helped for one day. Then the memory
crept back up as I kept adding things, so I think something is slowly leaking.
I also closed every extension in my editor except the basic ones, and that saved maybe 300MB, nothing
more. Restarting the server brings it back down to around 2GB, but it climbs again within an hour.
One thing I noticed is that the images are quite large, some are 4MB straight from the phone camera.
I am not sure if the dev server keeps all of them in memory,
but it could be part of this. I have not touched any config files because
I am scared of breaking something that mostly works. My friend uses a similar
setup on 16GB and says he never checks memory, so he could not help me.
So I am wondering what a normal number looks like for a small project like this one.
Should I be compressing the images first, or is that a separate problem from the memory climbing?
If anyone has fixed this on a low RAM laptop, I would like to hear what changed for
you. I do not want to spend money on an upgrade if a simple setting can solve it.
💻techbhai
Tech Member
Sharing programming, web dev, and hardware tips on Hyd.Circle.