Closed Bug 787466 Opened 8 years ago Closed 2 years ago

about:memory should show extension names instead of long cryptic paths

Categories

(Toolkit :: about:memory, enhancement)

enhancement
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1430317

People

(Reporter: danweiss, Unassigned)

Details

I was looking at the about:memory screen.
I saw that memory used by extensions was displayed using a rather cryptic way, it shows the full absolute file path of an extension instead of showing its name.

For example, we have "compartment([System Principal], jar:file:///C:/Documents%20and%20Settings/Dan%20Weiss/Application%20Data/Mozilla/Firefox/Profiles/exkz4pkr.New%20Profile%202/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource:///modules/XPIProvider.jsm:3626))"

This string is so long that it gets cut off long before the path is complete. On my screen, it's cut off after the word "New Profile", but you can still copy-paste the entire string onto the clipboard.

I had to do about a minute of investigation to see that this path corresponded to the Adblock Plus extension.

Since Firefox itself knows the name of an extension, it should be displaying something like "Extension: Adblock Plus" instead of a really long filename containing a UUID.
Component: Untriaged → about:memory
Product: Firefox → Toolkit
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
This is certainly possible, but unfortunately it's harder than it seems:
- The id-to-name mapping is stored in the add-ons manager, which is JS code.
- The memory report is done in the JS engine, with C++ code.
- There aren't good conduits between the two places at the moment.
Nils Maier has an add-on that does something similar:  https://github.com/nmaier/about-addons-memory/.
This is partly done. For some add-ons you get a reasonable name, e.g. I currently see this:

├───42.43 MB (05.82%) -- add-ons
│   ├──20.23 MB (02.77%) ++ {59c81df5-4b7a-477b-912d-4e0fdf64e5f2}
│   ├──19.90 MB (02.73%) ++ {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/js-non-window/zones/zone(0x7f57159ca800)/compartment([System Principal], jar:file:///home/njn/.mozilla/firefox/aijnow0u.default/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/addons/XPIProvider.jsm:4174))
│   └───2.30 MB (00.32%) ++ treestyletab@piro.sakura.ne.jp/js-non-window/zones/zone(0x7f57159ca800)

The first two aren't good, but the third one is not bad.

Nils, I can look in about:support to find out what {59c81df5-4b7a-477b-912d-4e0fdf64e5f2} and {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} are (ChatZilla and AdBlock Plus, respecitvely). Is it possible for the relevant memory reporting code to do the same lookup and get a nicer identifier?
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1430317
You need to log in before you can comment on or make changes to this bug.