Closed Bug 1127570 Opened 5 years ago Closed 5 years ago

Include file name in about:memory output when loading from a file

Categories

(Toolkit :: about:memory, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: mccr8, Assigned: njn)

References

Details

Attachments

(1 file)

If I load a memory report from a file, it would be nice to have the name of the file included in the output of about:memory.  Otherwise it can be hard to remember what you even looked at.
I have a patch that puts it in document.title. This is good because you get it in the tab marker. Do you think we need something in the page content as well?
Depends on: 1127645
Hmm.  Maybe.  The tabs aren't too wide, and some of these files names are machine generated and gigantic.
(In reply to Andrew McCreight [:mccr8] from comment #2)
> Hmm.  Maybe.  The tabs aren't too wide, and some of these files names are
> machine generated and gigantic.

Well, yes. But you can still see the title in the title bar when you're on a particular tab. So the bit about the tab marker was a red herring.

So, to ask again in a different way: is having the filename in the title bar enough, or is something in-page necessary? Currently we just have "about:memory" in the title bar; my patch changes this to "about:memory (filename)" when a file gets loaded.
(In reply to Nicholas Nethercote [:njn] from comment #3)
> Well, yes. But you can still see the title in the title bar when you're on a
> particular tab.

Not on OSX.
 
> So, to ask again in a different way: is having the filename in the title bar
> enough, or is something in-page necessary? Currently we just have
> "about:memory" in the title bar; my patch changes this to "about:memory
> (filename)" when a file gets loaded.

Well, that's obviously an improvement over the current situation, so we can just try that for now and see how it goes.
This changes about:memory so that whenever measurements are shown, the origin
of those measurements is visible in the title bar.

- "about:memory (live measurement)" is used when you do "Measure".

- "about:memory (<filename>)" is used when you do "Load...".

- "about:memory (diff of <filename1> and <filename2>)" is used when you do
  "Load and diff...".

- "about:memory" is used in all other cases, e.g. when about:memory is first
  loaded, and after all non-measurement actions (GC, GC, etc.)
Attachment #8556896 - Flags: review?(continuation)
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment on attachment 8556896 [details] [diff] [review]
Include measurement origins in about:memory's title bar

Review of attachment 8556896 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for fixing this.
Attachment #8556896 - Flags: review?(continuation) → review+
https://hg.mozilla.org/mozilla-central/rev/005ba01f20cb
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Duplicate of this bug: 936859
You need to log in before you can comment on or make changes to this bug.