Bug 59939

Summary: Web Inspector: revision history storage is too slow.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
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 yurys: review+

Description Pavel Feldman 2011-05-02 09:29:53 PDT
It turns out that iterating localStorage keys is very expensive (results in slow inspector start), refactor revision history in order not to rely upon that operation.
Comment 1 Pavel Feldman 2011-05-02 09:34:29 PDT
Created attachment 91929 [details]
Patch
Comment 2 Yury Semikhatsky 2011-05-03 01:25:37 PDT
Comment on attachment 91929 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=91929&action=review

> Source/WebCore/inspector/front-end/Resource.js:140
> +            if (resource && historyItem.loaderId === resource.loaderId) {

Can we make sure there is no collision between loaderIds?

> Source/WebCore/inspector/front-end/ResourceTreeModel.js:71
>          WebInspector.mainResource = this._addFramesRecursively(mainFramePayload);

Let's remove this: 
if (error)
6868            return;
Comment 3 Pavel Feldman 2011-05-03 01:52:16 PDT
(In reply to comment #2)
> (From update of attachment 91929 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=91929&action=review
> 
> > Source/WebCore/inspector/front-end/Resource.js:140
> > +            if (resource && historyItem.loaderId === resource.loaderId) {
> 
> Can we make sure there is no collision between loaderIds?
> 

We don't have unique session id yet.

> > Source/WebCore/inspector/front-end/ResourceTreeModel.js:71
> >          WebInspector.mainResource = this._addFramesRecursively(mainFramePayload);
> 
> Let's remove this: 
> if (error)
> 6868            return;

I'll put console.error here.
Comment 4 Pavel Feldman 2011-05-03 02:01:53 PDT
Committed r85591: <http://trac.webkit.org/changeset/85591>