Massive Memory Gains in Node.js 4.2
Still debating whether or not it's worth upgrading to the latest and greatest Node.js LTS, otherwise known as 4.2? If you are still running 0.12 or stuck even further in the dark ages on 0.10 and below, these numbers might make you think twice about being set in your ways.
We've been running Node.js 0.12 since shortly after its release and have had no issues with it. Loving to live on the cutting edge, after several weeks of testing 4.2 locally, we decided to push it live to both CasinoRPG and GoldFire Network. We didn't need to update any of our code (other than re-installing our modules), so we assumed it would be a routine upgrade with the possibility of some minor speed boosts. What we saw was far from ordinary:
On both CasinoRPG and GoldFire Network, not only did we see our memory graphs smooth out significantly, but the total memory usage dropped by over 50%! This is the kind of improvement you might expect in a very early version, but it certainly caught us off guard at this stage of the game.
So, why the massive memory gains when upgrading to 4.2? That remains somewhat of a mystery to us (if you've got an idea we'd love for you to comment). Certainly a vastly newer version of V8 has helped, and we've heard that updates to Buffer have led to fairly significant gains, but there's surely more at play here. Regardless, the results can't be ignored. Happy upgrading!