The Browser - Memory Usage

How does memory usage affect performance?

Memory usage may not seem like a big deal with performance. In fact, often speed optimizations com at the cost of increased memory storage using techniques like caching. However, it is still essential for a couple of reasons.

First, it takes time to initialize the data and if there is little chance that you will need it, or if you only need a small part of the data then making some small changes can provide a performance boost.

Second, if the computer running the code is running low on memory, you are going to see a degradation of performance as the JavaScript engine is running its garbage collection processes more and more frequently. Running low on memory is most often the problem encountered when there is a memory leak in your program.

Memory tab

The main thing to check on this tab is a snapshot of the memory used. This snapshot of is of the memory heap and contains all the objects in the application which were in memory at the time the snapshot was taken.

With the snapshot, you can drill down into the more significant sections of memory use and find potential items that can be reduced or removed.

If you take multiple snapshots, you can compare them which is helpful when you are looking for memory leaks.