Skip to Content


How to deal with memory management at a massive scale on the web

JavaScript applications suffer from the same memory related problems that native applications do, such as memory leaks and bloat, yet they must also deal with garbage collection pauses.

This article I came across at HTML5 rocks has a great write up about memory management and JavaScript. It teaches / refreshes the terminology, methodology and gives you important tips on creating efficient memory management with you apps, so when you scale up you will lessen the likelihood of running into memory problems. Although most of us will not reach the heights of GMail it is good to know what to do if you ever get there.

Cutting to the chase

We started off in a crisis. Covered the core basics of memory management in JavaScript and V8 in particular. You learned how to use the tools, including the new object tracker feature available in the latest builds of Chrome. The Gmail team, armed with this knowledge, solved their memory usage problem and saw improved performance. You can do the same with your web apps!

That’s reason enough to check out this article. Here.

HTML5 Web Workers

What if JavaScript had the ability to run your code in the background and not interfere with the responsiveness of your UI. What if you could spawn a thread to do long running computations such as image filtering and sorting. Well with HTML5 Web Workers you can do just that!

Read the rest here.