Bug 133027

Summary: REGRESSION (r166422): All RenderBox objects grew 104 bytes from adding repaint timers.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Severity: Normal CC: bdakin, commit-queue, dino, esprehn+autocc, glenn, koivisto, kondapallykalyan
Priority: P2 Keywords: InRadar, Performance
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
koivisto: review-
Patch none

Description Andreas Kling 2014-05-17 01:08:11 PDT
Comment 1 Andreas Kling 2014-05-17 01:19:18 PDT
Created attachment 231624 [details]
Comment 2 Antti Koivisto 2014-05-17 01:25:27 PDT
Comment on attachment 231624 [details]

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

> Source/WebCore/rendering/RenderBox.cpp:131
>  RenderBox::~RenderBox()
>  {
> -    m_repaintTimer.stop();
> +    view().unscheduleLazyRepaint(*this);

Shouldn't it check the lazy repaint bit? Unscheduling does hash lookup and is expensive. Also we might want to not do this on full tree teardown.

> Source/WebCore/rendering/RenderView.cpp:142
> +void RenderView::scheduleLazyRepaint(RenderBox& renderer)
> +{
> +    renderer.setRenderBoxNeedsLazyRepaint(true);

This could bail out if the bit is already set.

> Source/WebCore/rendering/RenderView.cpp:150
> +void RenderView::unscheduleLazyRepaint(RenderBox& renderer)
> +{
> +    renderer.setRenderBoxNeedsLazyRepaint(false);

This could either assert or bail out if the bit is not set.
Comment 3 Andreas Kling 2014-05-17 01:28:18 PDT
Created attachment 231625 [details]

That went really well. Let's try again!
Comment 4 WebKit Commit Bot 2014-05-17 03:09:17 PDT
Comment on attachment 231625 [details]

Clearing flags on attachment: 231625

Committed r168993: <http://trac.webkit.org/changeset/168993>
Comment 5 WebKit Commit Bot 2014-05-17 03:09:21 PDT
All reviewed patches have been landed.  Closing bug.