Closed Bug 1214070 Opened 9 years ago Closed 9 years ago

HeapAnalysesWorker should support diffing census reports

Categories

(DevTools :: Memory, defect)

defect
Not set
normal

Tracking

(firefox44 fixed)

RESOLVED FIXED
Firefox 44
Tracking Status
firefox44 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file, 1 obsolete file)

Diagram of what is needed here, chronological order starting at top and ending at the bottom: -----------8<------------8<-------------8<---------------- HeapAnalysesClient HeapAnalysesWorker (snapshot1, snapshot2, breakdown) --------------> takes a census of snapshot1 takes a census of snapshot2 simultaneously walk census reports, record difference between the two in delta-report <---------------------------------- delta-report -----------8<------------8<-------------8<----------------
Should this be done in C++ in Debugger.Memory APIs, or can this be handled in JS in the worker itself? We can probably implement the same `asTreeNode` option as bug 1214231, if we generate a diff report, and run that through CensusTreeNode. If this is ok to be done in JS, as it's O(n) and depending on the breakdown options, (could be really small, but maybe something like allocation sites would be too much), I can take care of it.
I don't think this needs to be pushed down into the platform. I am planning on making this a different worker request/response, rather than an option on the existing request/response because I think it is different enough to warrant that. I have a WIP already, will get a first draft up soon.
Any thoughts on the UI/UX for this?
Oops, meant to type more. We'd need a way to select 2 snapshots and diff them, and then what is the outcome of that -- possibly just another snapshot (that could have negative values), with numbers being + or - (color coded?)?
Yes, it will generate another report which contains the delta number/size of things and has the same structure (as specifified by the breakdown). Not sure what the UI for selecting two snapshots should look like, but the view of the diff should be pretty much the same as viewing a single census report. Yes we should add +/- signs, I like the idea of coloring too. We should probably sort by abs(delta) in this case, at least at first. And eventually be able to choose sorting by biggest (most new things in census2 that didn't exist in census1) and smallest (things that existed in census1 but no longer exist in census2) as well.
For a similar reference, IE11's tools[0], each snapshot contains an overall diff from the first snapshot, although this is aggregate data. [0] https://i-msdn.sec.s-msft.com/dynimg/IC769141.png
Attachment #8673809 - Attachment is obsolete: true
Comment on attachment 8674281 [details] [diff] [review] Add support for diffing census reports to HeapAnalysesWorker Review of attachment 8674281 [details] [diff] [review]: ----------------------------------------------------------------- Looks great!
Attachment #8674281 - Flags: review?(jsantell) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: