Bug 156707 - Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load
Summary: Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-18 10:12 PDT by Timothy Hatcher
Modified: 2016-05-21 12:20 PDT (History)
8 users (show)

See Also:


Attachments
Screenshot of a profile (278.17 KB, image/png)
2016-04-18 10:12 PDT, Timothy Hatcher
no flags Details
[Profile] First optimization pass (371.22 KB, image/png)
2016-04-23 16:32 PDT, Matt Baker
no flags Details
[Profile] 2nd optimization pass (347.24 KB, image/png)
2016-04-23 21:49 PDT, Matt Baker
no flags Details
[Patch] Proposed Fix (34.47 KB, patch)
2016-05-20 15:47 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] Proposed Fix (46.48 KB, patch)
2016-05-20 17:06 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] Proposed Fix (46.86 KB, patch)
2016-05-20 17:57 PDT, Matt Baker
no flags Details | Formatted Diff | Diff

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