WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
66136
[DRT] Reduce redundant layout when running test in DRT
https://bugs.webkit.org/show_bug.cgi?id=66136
Summary
[DRT] Reduce redundant layout when running test in DRT
Johnny(Jianning) Ding
Reported
2011-08-12 06:56:33 PDT
Currently in Webkit, DOM and other data changes may call FrameView::scheduleRelayout to schedule a real layout in a timer, current timer interval is 250ms (see cLayoutScheduleThreshold in Document.cpp), the delayed layout mechanism keeps render engineer continuously updating layout (and does not block other components like pasring) instead of rendering it one time (no layout before it), so users can see the layout updated smoothly. However in DRT, since no one cares about the intermediate layout, the layout calls scheduled by layoutTimer (FrameView::m_layoutTimer) before the final layout looks useless and cost lots of system resources especially CPU resource. Seems likes some mobile WebKit ports have realize the similar issue, there is a data member called m_extraLayoutDelay added in Document to increase the minimum delay between re-layouts. It is set by setExtraLayoutDelay to modify the minimum delay used at different points during the lifetime of the Document. Although the API setExtraLayoutDelay is marked as "used by Android", but I think we can use it for all DRT ports to reduce the delayed layout. No worries, the synchronous layout requests are not affected. For example, when script calls element.offsetTop to try to get the position of a element, the document will call updateLayoutIgnorePendingStylesheets to update the layout immediately in order to get the latest position (also it's a unstable position) of element. The API setExtraLayoutDelay is only used to reduce the intermediate layout calls in order to reduce test time/improve DRT performance, it has pretty obvious effect when running layouts on mobile devices. I have test the way on linux, mac, results are pretty good. Does it sound good? I'd like to get some inputs before sending the patch.
Attachments
Add attachment
proposed patch, testcase, etc.
Tony Chang
Comment 1
2011-08-12 10:14:48 PDT
Does DRT on all ports set m_layoutTimer? How much faster is it to run all the layout tests when setting a large value for extra layout delay? Do any layout tests fail (you could upload a patch and see if/what fails on the ews bots)?
Alexey Proskuryakov
Comment 2
2011-08-12 21:27:26 PDT
> However in DRT, since no one cares about the intermediate layout
Why not? We probably get tons of accidental testing through that.
Johnny(Jianning) Ding
Comment 3
2011-09-06 06:38:50 PDT
Drop this bug since m_extraLayoutDelay is cleanup in
https://bugs.webkit.org/show_bug.cgi?id=67303
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