Bug 156707

Summary: Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Screenshot of a profile
none
[Profile] First optimization pass
none
[Profile] 2nd optimization pass
none
[Patch] Proposed Fix
none
[Patch] Proposed Fix
none
[Patch] Proposed Fix none

Description Timothy Hatcher 2016-04-18 10:12:23 PDT
Created attachment 276644 [details]
Screenshot of a profile

We should be able to lazy land most of CSSStyleDetailsSidebarPanel and the sub-panels to speed this up.
Comment 1 Radar WebKit Bug Importer 2016-04-18 10:12:54 PDT
<rdar://problem/25780404>
Comment 2 Matt Baker 2016-04-23 16:32:55 PDT
Created attachment 277171 [details]
[Profile] First optimization pass

Lazily creating the VisualStylesSidebar UI when the panel is shown reduces CSSStyleDetailsSidebarPanel load time from 50ms to ~14ms.

Will try lazy loading other panels next.
Comment 3 Matt Baker 2016-04-23 21:49:55 PDT
Created attachment 277180 [details]
[Profile] 2nd optimization pass

Although load times necessarily vary, lazy loading all sidebars sped up the loading of the frontend by over 40%!

CSSStyleDetailsSidebarPanel now takes > 2ms at startup if hidden by default.
Comment 4 Matt Baker 2016-04-23 21:51:05 PDT
(In reply to comment #3)
> Created attachment 277180 [details]
> [Profile] 2nd optimization pass
> 
> CSSStyleDetailsSidebarPanel now takes > 2ms at startup if hidden by default.
< 2ms
Comment 5 Matt Baker 2016-05-20 15:47:48 PDT
Created attachment 279508 [details]
[Patch] Proposed Fix
Comment 6 Matt Baker 2016-05-20 17:06:31 PDT
Created attachment 279518 [details]
[Patch] Proposed Fix
Comment 7 Matt Baker 2016-05-20 17:27:40 PDT
Comment on attachment 279518 [details]
[Patch] Proposed Fix

Looks like this breaks DataGrid column layout
Comment 8 Matt Baker 2016-05-20 17:57:40 PDT
Created attachment 279527 [details]
[Patch] Proposed Fix
Comment 9 WebKit Commit Bot 2016-05-21 12:20:36 PDT
Comment on attachment 279527 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 279527

Committed r201245: <http://trac.webkit.org/changeset/201245>
Comment 10 WebKit Commit Bot 2016-05-21 12:20:41 PDT
All reviewed patches have been landed.  Closing bug.