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)
commitba3a6611b24fce5c709d15cd600dffa759ef190d
tree5c40a88d1546861efa0133db89a0e1f7d5507509
parentb18533fc261a756aeb68d92d6ace3245b786970c
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: https://svn.webkit.org/repository/webkit/trunk@96321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/NetworkPanel.js