WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
153392
Web Inspector: Reduce unnecessary forced layouts in TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=153392
Summary
Web Inspector: Reduce unnecessary forced layouts in TimelineOverview
Joseph Pecoraro
Reported
2016-01-22 21:42:32 PST
* SUMMARY Reduce unnecessary forced layouts in TimelineOverview. It looks like autoscroll when not autoscrolling would set the scrollContainerElement.scrollLeft to 0 (which it already was) and force a synchronous layout. Seems we can just skip this work if the calculated scrollLeft value would have been 0. This eliminated the forced layouts I saw triggered by TimelineOverview recording reloads of numerous pages.
Attachments
[PATCH] Proposed Fix
(1.82 KB, patch)
2016-01-22 21:44 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-01-22 21:42:49 PST
<
rdar://problem/24312344
>
Joseph Pecoraro
Comment 2
2016-01-22 21:44:00 PST
Created
attachment 269646
[details]
[PATCH] Proposed Fix
Timothy Hatcher
Comment 3
2016-01-22 22:00:41 PST
Comment on
attachment 269646
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=269646&action=review
> Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:390 > + if (scrollLeft)
Does this need to be: scrollLeft || this._scrollContainerElement.scrollLeft That way if it is no zero already it will set it still. Or scrollLeft !== this._scrollContainerElement.scrollLeft
Joseph Pecoraro
Comment 4
2016-01-25 11:01:01 PST
(In reply to
comment #3
)
> Comment on
attachment 269646
[details]
> [PATCH] Proposed Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=269646&action=review
> > > Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:390 > > + if (scrollLeft) > > Does this need to be: scrollLeft || this._scrollContainerElement.scrollLeft > > That way if it is no zero already it will set it still. Or scrollLeft !== > this._scrollContainerElement.scrollLeft
This was intentional. I do not want to actually call `element.scrollLeft` since that could force a layout. I don't think autoscroll will every intentionally scroll you to zero. Starting a new recording automatically resets the scroll position anyways. So this was a cheap hack, if the scrollLeft we calculate is zero, do no work. I didn't find any cases where this was a problem, and I saw fewer (zero) forced layouts caused by TimelineOverview in reload recordings that didn't cause the overview to auto-scroll.
WebKit Commit Bot
Comment 5
2016-01-25 11:48:55 PST
Comment on
attachment 269646
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 269646 Committed
r195544
: <
http://trac.webkit.org/changeset/195544
>
WebKit Commit Bot
Comment 6
2016-01-25 11:49:00 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug