This adds the INDIVIDUALS view state to the memory panel, renames "dominator
tree display" to "label display", and adds a view for listing the individual
nodes in a census group and inspecting each nodes' retaining paths.
Effectively, this moves `inverted` from a global and per-census state, to a
per-`breakdownModel` state. Additionally, a `breakdownModel` is not just a
breakdown spec anymore, but also some extra associated metadata. As such, it has
been split in two and renamed to "censusDisplayModel" and
"dominatorTreeDisplayModel".
This commit extends the devtools' memory panel's dominators view with a sidebar
that displays the 5 shortest retaining paths from the GC roots for the selected
node in the dominator tree.
Goal of this commit is to ensure we can display at least 12 number digits +
4 percent chars in the memory table columns whatever the viewport size.
With a viewport width of 800px, we still have 200px usable for the last col
in census view
Some items of the memory table are already using 90% font size.
This commit applies this font-size to the whole memory table.
Also added a 16ch min-width to the non-flex columns
Only visible table rows are rendered, therefore we
cannot rely on :nth-child(2) to create background stripes.
This commit adds the source index to the treeNode props.
Using this index, the treeNode can add a "tree-node-odd"
className to its element.
In css, tree-node-odd is then used to add the alternate
background color to a row,
This patch overhauls the memory tool's frontend from being in a state of viewing
a snapshot's census (the implicit default) or viewing a census diff (a special
cased kind of thing) to one of three recognized view states: (1) census, (2)
diffing, or (3) dominator tree. The logic surrounding our current view is more
explicit now. View option (3) is the new one, whose introduction required those
clean ups.
Dominator trees are too large to render in full, all at once. Instead, we
eagerly load and render a few levels deep and then incrementally fetch further
subtrees as their parents are expanded in the UI. This means that we get new
Tree component instances across incremental fetches. Before this commit, the
Tree component stored a bunch of state internally (in this.state rather than
this.props) and we would lose focus and expansion state across incremental
fetches. This internal state has been pulled out and made as explicit props,
which are now managed by actions and reducers just like the rest of the state.