Bug 59939 - Web Inspector: revision history storage is too slow.
Summary: Web Inspector: revision history storage is too slow.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-02 09:29 PDT by Pavel Feldman
Modified: 2011-05-03 02:01 PDT (History)
10 users (show)

See Also:


Attachments
Patch (7.72 KB, patch)
2011-05-02 09:34 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>