[webkit-changes] [WebKit/WebKit] 41ae46: Web Inspector: Timelines: Unable to load more inst...
Razvan Caliman - Apple
noreply at github.com
Thu Sep 5 09:20:03 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 41ae46049e57b0879803ec62b8e814023f5b9e36
https://github.com/WebKit/WebKit/commit/41ae46049e57b0879803ec62b8e814023f5b9e36
Author: Razvan Caliman <rcaliman at apple.com>
Date: 2024-09-05 (Thu, 05 Sep 2024)
Changed paths:
M Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js
M Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js
Log Message:
-----------
Web Inspector: Timelines: Unable to load more instances of a type in JavaScript Allocations view
https://bugs.webkit.org/show_bug.cgi?id=278667
rdar://133810318
Reviewed by BJ Burg.
For heap snapshot trees with many entries, instances are rendered batched in groups of 100.
A `WI.HeapSnapshotInstanceFetchMoreDataGridNode` with controls to generate the DOM for
the next batch or the full list is created, but it marked as `hidden` as a side-effect of
https://bugs.webkit.org/show_bug.cgi?id=157582.
A `WI.DataGrid` is virtualized to only display the limited number of data grid nodes
that are visible in the viewport. Any `WI.DataGridNode` marked as `hidden` is skipped
in `WI.DataGrid.updateVisibleRows()`:
```
let revealedRows = this._rows.filter((row) => row.revealed && !row.hidden);
```
`WI.HeapSnapshotInstanceFetchMoreDataGridNode` gets marked as hidden when inserted inserted:
`WI.DataGrid.insertChild(node)` -> `WI.DataGrid._applyFiltersToNodeAndDispatchEvent(node)`
-> `WI.DataGrid._applyFiltersToNode(node)` where a delegate filtering method is called:
`WI.HeapSnapshotContentView.dataGridMatchNodeAgainstCustomFilters()`.
This delegate filter explicitly skips `WI.HeapSnapshotInstanceFetchMoreDataGridNode` nodes:
```
dataGridMatchNodeAgainstCustomFilters(node)
{
console.assert(node);
if (node instanceof WI.HeapSnapshotInstanceFetchMoreDataGridNode)
return false;
return true;
}
```
Combined with the virtualization logic from `WI.DataGrid.updateVisibleRows()` this results
in always hiding the controls to load more entries.
The intent was likely to skip showing these controls when there are no matches for a filter query.
This patch ensures that the delegate filter checks for visible sibling data grid nodes when deciding
whether to show the controls to load more entries.
The filter query matches against the top-level instance type, so the number of matched individual instances
of that type will not vary. Therefore, the controls to load more entries don't have to update their counts.
* Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js:
(WI.HeapSnapshotContentView.prototype.dataGridMatchNodeAgainstCustomFilters.hasVisibleSiblingNodes):
(WI.HeapSnapshotContentView.prototype.dataGridMatchNodeAgainstCustomFilters):
Canonical link: https://commits.webkit.org/283215@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list