Bug 69010

Summary: Web Inspector: network log view refresh optimizations
Product: WebKit Reporter: Andrey Kosyakov <caseq>
Component: Web Inspector (Deprecated)Assignee: Andrey Kosyakov <caseq>
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 pfeldman: review+, pfeldman: commit-queue-

Description Andrey Kosyakov 2011-09-28 10:58:07 PDT
This is a slight optimization of the way we update refresh network log view: now we create new rows off-screen, so that we spend less time when render tree is updated during updateOffscreenRow(). This also removes a redundant call to updateOffscreenRows() in refresh().

This reduces time for inspector/performance/resources/network-append-30-requests.html from ca 620ms to 590ms on my box.
Comment 1 Andrey Kosyakov 2011-09-28 11:03:58 PDT
Created attachment 109038 [details]
patch
Comment 2 Pavel Feldman 2011-09-28 22:13:40 PDT
Comment on attachment 109038 [details]
patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:678
> +                node.element.addStyleClass("offscreen");

You should move this to where the element is accessible after creation: WebInspector.NetworkDataGridNode.prototype.createCells in your case.

> Source/WebCore/inspector/front-end/NetworkPanel.js:702
> +        // FIXME: evaluate performance impact of moving this before a call to sortItems()

Would be great to address it in this change. Note that while populating the log from scratch, wasScrolledToLastRow is always true. It might be that it is a noop though.
Comment 3 Andrey Kosyakov 2011-09-29 04:19:27 PDT
Manually committ(In reply to comment #2)
> (From update of attachment 109038 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=109038&action=review
> 
> > Source/WebCore/inspector/front-end/NetworkPanel.js:678
> > +                node.element.addStyleClass("offscreen");
> 
> You should move this to where the element is accessible after creation: WebInspector.NetworkDataGridNode.prototype.createCells in your case.

Fixed!

> 
> > Source/WebCore/inspector/front-end/NetworkPanel.js:702
> > +        // FIXME: evaluate performance impact of moving this before a call to sortItems()
> 
> Would be great to address it in this change. Note that while populating the log from scratch, wasScrolledToLastRow is always true. It might be that it is a noop though.

it trquires a bit more of investigation (probably better benchmark) It's not a noop now, if I just move it to an earlier moment, we loose some 50ms.
I'm going to come back to this after extending the benchmark suite with profiling-like methods.

Manually committed r96318: http://trac.webkit.org/changeset/96318