Recent about:memory improvements

The landing of patches from two recent bugs has substantially changed the look of about:memory.  When you load the page all see now is the following.

about:memory screenshot

Measurements aren’t taken away;  you have to click on the “Measure” button for that to happen.  Also, adding ?verbose to the URL no longer has an effect.  If you want verbose output, you need to click on the “verbose” checkbox.

The motivation for this change was that about:memory’s functionality has expanded greatly over the past two years, and cramming more functionality into the existing UI was a bad idea.  There are numerous advantages to the new UI.

  • No need to control behaviour via the URL, which is admittedly an odd way to do it.
  • You can switch between verbose and non-verbose modes without having to reload the page.
  • All the buttons are at the top of the page instead of the bottom, so you don’t have to scroll down.
  • You can trigger a GC/CC/minimize memory usage event without having do a memory measurement.
  • When you save reports to file, it’s clearer that a new measurement will be taken, rather than saving any measurements that are currently displayed on the screen.
  • The buttons are grouped by function, which makes them easier to understand.

There’s also the “Load and diff…” button, which lets you easily find the difference between two saved memory report files.  Here’s some example output taken after closing a tab containing a Google search result.

about:memory diff output

You can see that all the measurements are negative.  The [-] markers on leaf nodes in the tree indicate that they are present in the first file but not in the second file.  Corresponding [+] markers are used for measurements present in the second file but not the first.

6 Responses to Recent about:memory improvements

  1. > No need to control behaviour via the URL, which is admittedly an odd way to do it.

    I beg to differ. It’s a very convenient way to do it, which doesn’t require fiddling with a UI.

    • Lowest common denominator, glandium. It’s an exceedingly strange way to alter a test in the average user’s eyes. Even if a bit more tedious for experienced testers, this method will ensure that Joe Schmo will /see/ the option exists just by visiting the page, which is far more user-friendly.

      • To me, it’d still have made more sense to keep ?verbose as a way to control what state the checkbox starts in.

      • about:memory can be hardly considered an average-user facing UI, so having some advanced functionality in the URL is okay. “Joe Schmo” will never visit about:memory.

  2. shouldnt the “measure and save” do a verbose report by default, irrespective of the “verbose” checkbox ? because there is a very high probability that anyone doing this is doing for debugging/bug reporting purpose.

    • Nicholas Nethercote

      When you save, all the memory report data is saved. You can then decide whether to view it in verbose or non-verbose mode. That’s why the verbose checkbox doesn’t apply to the “Measure and save…” function.

      Furthermore, with one obscure, Linux-only exception, the information available in non-verbose mode is identical to that in verbose mode. The only difference is that in non-verbose mode a lot of it is hidden at first, but you can click around to unhide it.