Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
How to reduce ram usage in development

Currently I'm working on a fullstack website using ~80 npm packages. But the ram usage is too high(sometimes it reach 2.6gb) and my pc become sooo slow. How can i reduce the ram usage? should I install the dependency globally?

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can tell node to use less RAM (or more RAM) for its heap by running it with this option. The number is the requested heap size in MiB.

node --max-old-space-size=750 whatever.js

1.5GiB is the default size.

If your program is using lots of RAM you may have a memory leak. That is, you may, by mistake, be keeping references to objects or arrays you no longer need. This could happen in an express application, for example, if a route handler did something (wrong) like this to keep a list of incoming requests.

saved_req.push(req)

It seems unlikely that just your package code could blow out your RAM. Many node apps use dozens of packages, because top-level ones pull in many dependencies.

All that being said, if your machine is thrashing with one node app, one browser, and one IDE, you really need more physical RAM.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!