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

167
Visualizações
Forced and premature exit from recursion (investigate) in JavaScript (+React)

I have an interesting desire to know a way to break the recursion before it "freezes" the browser and exhausts all resources.

A banal example is just such a cycle:

while (true) {
    console.log('Test');
}

After a few seconds, the browser already becomes unmanageable, and after a few minutes it restarts. You can see this error too:

net::ERR_INSUFFICIENT_RESOURCES

QUESTION: Is it possible to somehow track the execution of recursion in order to stop it at the worst moment and return the browser to working capacity? At the same time, I want this to be a universal method, since the browser resources are different (I mean that exit after the nth iteration or second will not work here).

about 4 years ago · Juan Pablo Isaza
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