Title: [241004] trunk/Source/WebInspectorUI
- Revision
- 241004
- Author
- [email protected]
- Date
- 2019-02-05 17:01:38 -0800 (Tue, 05 Feb 2019)
Log Message
Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
https://bugs.webkit.org/show_bug.cgi?id=159577
<rdar://problem/27251461>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
(WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (241003 => 241004)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-02-06 00:55:28 UTC (rev 241003)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-02-06 01:01:38 UTC (rev 241004)
@@ -1,3 +1,15 @@
+2019-02-05 Devin Rousso <[email protected]>
+
+ Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
+ https://bugs.webkit.org/show_bug.cgi?id=159577
+ <rdar://problem/27251461>
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/ResourceDetailsSidebarPanel.js:
+ (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
+ (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
+
2019-02-05 Matt Baker <[email protected]>
Web Inspector: Elements tab: selection is broken after deleting the selected node
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js (241003 => 241004)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js 2019-02-06 00:55:28 UTC (rev 241003)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js 2019-02-06 01:01:38 UTC (rev 241004)
@@ -263,6 +263,8 @@
_refreshRelatedResourcesSection()
{
+ this._refreshRelatedResourcesSection.cancelThrottle();
+
// Hide the section if we don't have anything to show.
let groups = this._locationSection.groups;
let isSectionVisible = groups.includes(this._relatedResourcesGroup);
@@ -605,6 +607,9 @@
_applyResourceEventListeners()
{
+ if (!this._throttler)
+ this._throttler = this.throttle(250);
+
this._resource.addEventListener(WI.Resource.Event.URLDidChange, this._refreshURL, this);
this._resource.addEventListener(WI.Resource.Event.MIMETypeDidChange, this._refreshMIMEType, this);
this._resource.addEventListener(WI.Resource.Event.TypeDidChange, this._refreshResourceType, this);
@@ -615,7 +620,7 @@
this._resource.addEventListener(WI.Resource.Event.MetricsDidChange, this._refreshRequestAndResponse, this);
this._resource.addEventListener(WI.Resource.Event.SizeDidChange, this._refreshDecodedSize, this);
this._resource.addEventListener(WI.Resource.Event.TransferSizeDidChange, this._refreshTransferSize, this);
- this._resource.addEventListener(WI.Resource.Event.InitiatedResourcesDidChange, this._refreshRelatedResourcesSection, this);
+ this._resource.addEventListener(WI.Resource.Event.InitiatedResourcesDidChange, this._throttler._refreshRelatedResourcesSection, this);
this._needsToRemoveResourceEventListeners = true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes