Bug 62714

Summary: Web Inspector: breakpointsWithoutSourceFile values should be a maps, not arrays.
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Pavel Podivilov <podivilov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch.
none
Added a threshold to nuke breakpoints. yurys: review+

Description Pavel Podivilov 2011-06-15 03:46:42 PDT
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.
Comment 1 Pavel Podivilov 2011-06-15 03:47:33 PDT
Created attachment 97272 [details]
Patch.
Comment 2 Yury Semikhatsky 2011-06-15 03:52:18 PDT
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.
Comment 3 Pavel Podivilov 2011-06-15 07:36:31 PDT
(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.
Comment 4 Pavel Feldman 2011-06-15 07:38:00 PDT
We could introduce a threshold and nuke breakpoints only in case the value length is > 2000000 + migrate to the map.
Comment 5 Pavel Podivilov 2011-06-16 04:07:09 PDT
Created attachment 97433 [details]
Added a threshold to nuke breakpoints.
Comment 6 Pavel Podivilov 2011-06-17 05:41:01 PDT
Committed r89135: <http://trac.webkit.org/changeset/89135>