Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

218
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda