How do you handle high memory usage when building Nextjs app?
Unanswered
Western Grebe posted this in #help-forum
Western GrebeOP
I’m building a web application with Nextjs using a M3 MacBook Pro. Laptop heat is always high and battery life is very poor. On full charge it just let me work 3 hours until next charge. Anyone had same issue like me? If yes, how did you handle with that.
Not: I’m not doing highly technical work, it’s just basic event listing web application. And maximum 3-4 tabs are open on chrome usually when work.
Not: I’m not doing highly technical work, it’s just basic event listing web application. And maximum 3-4 tabs are open on chrome usually when work.
12 Replies
@B33fb0n3 I accept it 🤷♂️
Western GrebeOP
What is that mean actually? 🙂
@Western Grebe What is that mean actually? 🙂
You:
I:
How to handle high memory usage
I:
I accept it
Western GrebeOP
Ahh okay, so I'm not alone.
@Western Grebe Ahh okay, so I'm not alone.
yea, when I develope my app, I am around 4-6gb memory usage
Western GrebeOP
People on other forums said 1-3gb on average. I'm not sure if there is something wrong with node packages I'm using.
@Western Grebe I’m building a web application with Nextjs using a M3 MacBook Pro. Laptop heat is always high and battery life is very poor. On full charge it just let me work 3 hours until next charge. Anyone had same issue like me? If yes, how did you handle with that.
Not: I’m not doing highly technical work, it’s just basic event listing web application. And maximum 3-4 tabs are open on chrome usually when work.
First you can try deleting the .next folder and running it again, if that doesnt work then you could also try running it in a docker container.
You could also try to add the
--turbo flag in the package.json commandsWestern GrebeOP
I will definitely try it! Thank you.
No worries! let me know the outcome!
@Pearls No worries! let me know the outcome!
Western GrebeOP
There is around 5 percent improvement after doing your suggestions.
Ah, its not much but its better than nothing