Changeset 140805 in webkit
- Timestamp:
- Jan 25, 2013 2:24:16 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140804 r140805 1 2013-01-25 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: inspector slows down pages with many anonymous scripts. 4 https://bugs.webkit.org/show_bug.cgi?id=107928 5 6 Reviewed by Alexander Pavlov. 7 8 The problem was that workspace code introduced n^2 complexity for unique URI calculation. 9 10 * inspector/front-end/SimpleWorkspaceProvider.js: 11 (WebInspector.SimpleWorkspaceProvider): 12 (WebInspector.SimpleWorkspaceProvider.prototype.uniqueURI): 13 1 14 2013-01-25 Jussi Kukkonen <jussi.kukkonen@intel.com> 2 15 -
trunk/Source/WebCore/inspector/front-end/SimpleWorkspaceProvider.js
r139859 r140805 39 39 /** @type {Object.<string, WebInspector.ContentProvider>} */ 40 40 this._contentProviders = {}; 41 this._lastUniqueSuffix = 0; 41 42 } 42 43 … … 130 131 { 131 132 var uniqueURI = uri; 132 for (var i = 1; this._contentProviders[uniqueURI]; ++i)133 uniqueURI = uri + " (" + i+ ")";133 while (this._contentProviders[uniqueURI]) 134 uniqueURI = uri + " (" + (++this._lastUniqueSuffix) + ")"; 134 135 return uniqueURI; 135 136 },
Note: See TracChangeset
for help on using the changeset viewer.