Bug 157612 - Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
Summary: Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that ...
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-05-11 22:45 PDT by Joseph Pecoraro
Modified: 2016-05-12 12:33 PDT (History)
8 users (show)

See Also:


Attachments
[Patch] Proposed Fix (3.46 KB, patch)
2016-05-12 04:08 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] Proposed Fix (4.19 KB, patch)
2016-05-12 09:52 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 Joseph Pecoraro 2016-05-11 22:45:51 PDT
* SUMMARY
11% of time in TimelineRecording spent updating DataGrid that is not visible

DataGrid._updateVisibleRows is taking up 11% of time, including many forced layouts, when the DataGrid is not even visible.

In this case, the TimelineRecordingProgressView is showing, but in other cases, it likely isn't updating unless there is some kind of resize.

* STEPS TO REPRODUCE
1. Inspect theverge.com
2. Show Timeline tab
3. Show Scripts > Call Trees
4. Start Recording
  => Lots of time and forced layouts in DataGrid._updateVisibleRows
Comment 1 Radar WebKit Bug Importer 2016-05-11 22:46:08 PDT
<rdar://problem/26239051>
Comment 2 Matt Baker 2016-05-12 04:08:01 PDT
Created attachment 278728 [details]
[Patch] Proposed Fix
Comment 3 Timothy Hatcher 2016-05-12 08:28:00 PDT
Comment on attachment 278728 [details]
[Patch] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Views/TimelineView.js:312
> +        if (WebInspector.timelineManager.isCapturing() && !this.showsLiveRecordingData)

The ChangeLog says if the view supports live, but this does !live. Which is right?
Comment 4 Matt Baker 2016-05-12 09:45:16 PDT
Comment on attachment 278728 [details]
[Patch] Proposed Fix

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

>> Source/WebInspectorUI/UserInterface/Views/TimelineView.js:312
>> +        if (WebInspector.timelineManager.isCapturing() && !this.showsLiveRecordingData)
> 
> The ChangeLog says if the view supports live, but this does !live. Which is right?

The ChangeLog is correct. Copy paste error.
Comment 5 Matt Baker 2016-05-12 09:52:41 PDT
Created attachment 278736 [details]
[Patch] Proposed Fix
Comment 6 WebKit Commit Bot 2016-05-12 10:56:42 PDT
Comment on attachment 278736 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 278736

Committed r200779: <http://trac.webkit.org/changeset/200779>
Comment 7 WebKit Commit Bot 2016-05-12 10:56:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Joseph Pecoraro 2016-05-12 12:33:59 PDT
This is great! But there is still a concern that when a datagrid is showing (say layout and rendering) the datagrid is constantly forcing layouts. I wonder if we can improve _updateVisibleRows to not do as much work when its constraints are not changing.

For example the view is not resizing and not scrolling, it should probably not always force a layout.