Stop Crashing Node.js: How to Process 10GB Files with 15MB of RAM
We've all been there. You write a simple script to process a JSON or CSV file. It works perfectly on...
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1234) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Pujan Srivastava Posted on Apr 30 Stop Crashing Node.js: How to Process 10GB Files with 15MB of RAM #node #typescript #etl #javascript We've all been there. You write a simple script to process a JSON or CSV file. It works perfectly on your machine with a 100KB test file. Then, you deploy it to production, a 2GB file hits the server, and BAM: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).