Closed Bug 1235883 Opened 9 years ago Closed 9 years ago

Add support for inserting lazily loaded children into a DominatorTreeNode tree

Categories

(DevTools :: Memory, defect)

defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file, 1 obsolete file)

This commit adds the `DominatorTreeNode.insert` method to insert new DominatorTreeNode children that have just been loaded from the HeapAnalysesWorker into an existing partially complete DominatorTreeNode tree. This is done in a persistent and immutable fashion so that we can use === to differentiate different generations of `DominatorTreeNode` trees but still share the vast majority of the underlying structure. As infrastructure for the insertion, HeapAnalysesWorker's `getImmediatelyDominated` response also returns the path from the root to the node whose immediately dominated children are being fetched. This makes it much easier to know where to insert the newly loaded children.
Assignee: nobody → nfitzgerald
Blocks: 1229229
Status: NEW → ASSIGNED
Depends on: 1235457
This commit adds the `DominatorTreeNode.insert` method to insert new DominatorTreeNode children that have just been loaded from the HeapAnalysesWorker into an existing partially complete DominatorTreeNode tree. This is done in a persistent and immutable fashion so that we can use === to differentiate different generations of `DominatorTreeNode` trees but still share the vast majority of the underlying structure. As infrastructure for the insertion, HeapAnalysesWorker's `getImmediatelyDominated` response also returns the path from the root to the node whose immediately dominated children are being fetched. This makes it much easier to know where to insert the newly loaded children.
Attachment #8703030 - Flags: review?(jsantell)
Attachment #8702986 - Attachment is obsolete: true
Attachment #8702986 - Flags: review?(jsantell)
Comment on attachment 8703030 [details] [diff] [review] Add support for inserting lazily loaded children into a DominatorTreeNode tree Review of attachment 8703030 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/shared/heapsnapshot/HeapAnalysesWorker.js @@ +198,5 @@ > + let id = nodeId; > + do { > + path.push(id); > + id = dominatorTree.getImmediateDominator(id); > + } while (id !== null); I'd wager the memory tool has the most do-while's per LOC
Attachment #8703030 - Flags: review?(jsantell) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
[bugday-20160323] Status: RESOLVED,FIXED -> UNVERIFIED Comments: STR: Not clear. Developer specific testing Component: Name Firefox Version 46.0b9 Build ID 20160322075646 Update Channel beta User Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0 OS Windows 7 SP1 x86_64 Expected Results: Developer specific testing Actual Results: As expected
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: