Bug 127722

Summary: REGRESSION(r162837): 5% regression on html5-full-render and 3% regression in DoYouEvenBench
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer, esprehn+autocc, glenn, kangil.han, kling, koivisto, kondapallykalyan, sam, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch darin: review+

Description Ryosuke Niwa 2014-01-27 16:11:20 PST
See https://perf.webkit.org/#mode=charts&chartList=%5B%5B%22mac-mountainlion%22%2C%22DoYouEvenBench%2FFull%3ATime%3ATotal%22%5D%5D

We have 3% regression there.  The regression range is http://trac.webkit.org/log/?rev=162838&stop_rev=162835&verbose=on
and
r162835 is specific to GTK+
r162836 is TextTrack cleanup but DoYouEvenBench doesn't use media elements as far as I know
r162838 is just a TestExpectations update.
Comment 1 Radar WebKit Bug Importer 2014-01-27 16:12:07 PST
<rdar://problem/15920243>
Comment 2 Ryosuke Niwa 2014-01-27 16:12:56 PST
We also seem to have 5-6% regression on html5-full-render as well:
https://perf.webkit.org/#mode=charts&chartList=%5B%5B%22mac-mountainlion%22%2C%22Parser%2Fhtml5-full-render%3ATime%22%5D%5D
Comment 3 Andreas Kling 2014-01-27 16:15:17 PST
We may need to keep some of the paint throttling logic for WK1.
Comment 4 Antti Koivisto 2014-01-27 16:27:44 PST
This is likely just WK1. We don't need to keep throttling logic (it was never enabled in Mac anyway), but we may need to do some repaint rect unioning so we don't call to NSView land that much.
Comment 5 Antti Koivisto 2014-01-28 10:57:02 PST
Created attachment 222466 [details]
patch
Comment 6 WebKit Commit Bot 2014-01-28 10:57:51 PST
Attachment 222466 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/RenderView.cpp:1269:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Darin Adler 2014-01-28 11:19:10 PST
Comment on attachment 222466 [details]
patch

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

> Source/WebCore/dom/Document.cpp:4317
>  Document* Document::topDocument() const
>  {
> -    // FIXME: Why does this walk up owner elements instead using the frame tree as parentDocument does?
> -    // The frame tree even has a top() function.
> -    Document* document = const_cast<Document*>(this);
> -    while (Element* element = document->ownerElement())
> -        document = &element->document();
> -    return document;
> +    return m_frame ? m_frame->mainFrame().document() : const_cast<Document*>(this);
>  }

How is this change related to the rest of the patch? Does something depend on it?

Looks like this never returns null, so it should be changed to return a reference.

> Source/WebCore/rendering/RenderView.h:238
> +    class RepaintRegionAccumulator {

This has no members that are not copyable; we should probably mark it non-copyable explicitly.
Comment 8 Antti Koivisto 2014-01-28 11:28:22 PST
> How is this change related to the rest of the patch? Does something depend on it?

Not really except that I call it and noticed it was silly.

> Looks like this never returns null, so it should be changed to return a reference.

Yeah, later.
Comment 9 Andreas Kling 2014-01-28 11:32:55 PST
Comment on attachment 222466 [details]
patch

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

> Source/WebCore/ChangeLog:8
> +        Accumulate repaint region in RendeView instead of flushing rects directly to the system.

RenderView

> Source/WebCore/rendering/RenderView.h:240
> +        RepaintRegionAccumulator(RenderView*);

explicit
Comment 10 Antti Koivisto 2014-01-28 11:36:11 PST
https://trac.webkit.org/r162947
Comment 11 Alexey Proskuryakov 2014-01-28 12:56:58 PST
This change broke multiple repaint tests: <http://trac.webkit.org/changeset/162947>.

For a patch like this, waiting for EWS would have been very useful.
Comment 12 Alexey Proskuryakov 2014-01-28 15:38:09 PST
This caused timeouts on two flexbox tests, filed bug 127809.
Comment 13 David Kilzer (:ddkilzer) 2014-04-19 23:08:18 PDT
(In reply to comment #12)
> This caused timeouts on two flexbox tests, filed bug 127809.

This also caused Bug 129104.