Firefox’s New Memory Tool
Written by Ian Elliot   
Tuesday, 24 November 2015

Browsers are having a hard time differentiating themselves sufficiently to make it worth making a choice. Firefox 44 Dev Edition has something that might make you want to use it when debugging. 


ffdevedsq

Memory usage is usually a mysterious business, something you leave to the compiler or interpreter - until that is things get tough. If you are writing a mobile app for example how much memory everything is using suddenly becomes important.

Firefox has been adding debugging tools for some time and even issues a special development edition. The new memory tool in the developer edition 44 takes a snapshot of everything in memory and creates a tree/table categorizing use into: 

  • objects: JavaScript or general DOM/Web API objects, such as Function objects and DOM nodes
  • other: objects internal to the JavaScript engine
  • scripts: JavaScript sources loaded by the page
  • strings

Notice that the script use is specific to Firefox and its JavaScript engine but it should give you a reasonable idea of usage.  It specifically lists the contents of the heap usage of the currently open tab. 

 

firefoxmm

 

There is also a facility to view exactly where heap allocations occur in your program. The Allocation Stack view lists your function in order of the amount of memory they allocate. This is hierarchical so you see the total memory used by the function including any functions it might call.  

 

firefoxmm2

 

While there is no specific tool to find memory leaks you can take repeated snapshots to see if your program is increasing its memory use significantly over time. 

 

 
ffdevedsq

More Information

https://developer.mozilla.org/en-US/docs/Tools/Memory

Developer Edition 42

Firefox 42 Release Notes (Developer Edition) 

Download Firefox  

Related Articles

Firefox 42 Developer Edition       

Firefox 40 For Windows 10 & For Devs

React Devtools Beta

Firefox To Adopt Chrome Extensions

Is Windows 10 Playing Fair - Mozilla Thinks Not

Firefox Gets A Walled Garden

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin

 

Banner


Microsoft Introduces .NET Smart Components
01/04/2024

Microsoft has provided a set of .NET Smart Components, described as a set of genuinely useful AI-powered UI components that you can quickly and easily add to .NET apps. The components are prebuilt end [ ... ]



Is PHP in Trouble?
10/04/2024

The April 2024 headline for the TIOBE Index, which ranks programming languages in terms of their popularity, reads, "Is PHP losing its mojo" asking this question because this month PHP has dropped out [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 24 November 2015 )