Web Inspector: breakpointsWithoutSourceFile values should be a maps, not arrays. First, that way it is guaranteed that there is no duplicates. Second, breakpoints without source files will have the same structure as sourceFiles -> sourceFile.breakpoints, so we will be able to merge them together to reduce the complexity.
Created attachment 97272 [details] Patch.
Comment on attachment 97272 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=97272&action=review > Source/WebCore/inspector/front-end/Settings.js:-82 > - this._migrateSettings(); This code should be preserved to get rid of existing duplicates. Otherwise, inspector will be slow until next time breakpoints are persisted and override existing settings. r- for this.
(In reply to comment #2) > (From update of attachment 97272 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=97272&action=review > > > Source/WebCore/inspector/front-end/Settings.js:-82 > > - this._migrateSettings(); > > This code should be preserved to get rid of existing duplicates. Otherwise, inspector will be slow until next time breakpoints are persisted and override existing settings. r- for this. If breakpoints are duplicated in local storage, chances are that inspector is slow for quite some time. Why can not it be slow just a little bit longer? From the other side, migrating the settings causes the loss of all breakpoints, even if there were no duplicates.
We could introduce a threshold and nuke breakpoints only in case the value length is > 2000000 + migrate to the map.
Created attachment 97433 [details] Added a threshold to nuke breakpoints.
Committed r89135: <http://trac.webkit.org/changeset/89135>