It iterates through all the _scripts even they have no url. We can keep a separate map of scripts with url.
Created attachment 139990 [details] Patch
Comment on attachment 139990 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=139990&action=review > Source/WebCore/inspector/front-end/DebuggerModel.js:226 > + _resetScriptsMap: function() _resetScriptsMap -> _resetScriptMaps ? > Source/WebCore/inspector/front-end/DebuggerModel.js:338 > + this._scriptsWithSourceURL[scriptId] = script; Let's introduce a multimap from source URL to scripts instead to avoid the linear pass.
Created attachment 140179 [details] Patch
Comment on attachment 140179 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140179&action=review > Source/WebCore/inspector/front-end/DebuggerModel.js:337 > + scripts = {}; You never get a script by id from this map, why not use an array of scripts instead?
Comment on attachment 140179 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140179&action=review > Source/WebCore/inspector/front-end/DebuggerModel.js:223 > + _resetScriptsMaps: function() _reset ?
Committed r116077: <http://trac.webkit.org/changeset/116077>