Web Inspector: speed-up Network panel. Change _staleResources type from array to...
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 11:59:27 +0000 (11:59 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 11:59:27 +0000 (11:59 +0000)
commitb32aec0af2efe103254351fba7ac14e1e75fb3d3
tree5c40a88d1546861efa0133db89a0e1f7d5507509
parent73003e89aa2b5f248cf8808f651b494a40597c5f
Web Inspector: speed-up Network panel. Change _staleResources type from array to object.
https://bugs.webkit.org/show_bug.cgi?id=69081

There is a test with 30 requests.
For the each stage of loading a resource we have an entry in _staleResources array. There are at least 4 stages per request.
NetworkLogView._refresh function is creating/updating the resource row for the each such entry.
This array can be replaced with a hash map just because the resource associated with the entry is the same for all the entries with the same request id.

Reviewed by Pavel Feldman.

Test: inspector/performance/resources/network-append-30-requests.html

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView):
(WebInspector.NetworkLogView.prototype._invalidateAllItems):
(WebInspector.NetworkLogView.prototype.refresh):
(WebInspector.NetworkLogView.prototype._reset):
(WebInspector.NetworkLogView.prototype._refreshResource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/NetworkPanel.js