WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
67634
De-virtualize styleForRenderer()
https://bugs.webkit.org/show_bug.cgi?id=67634
Summary
De-virtualize styleForRenderer()
Antti Koivisto
Reported
2011-09-06 01:47:27 PDT
This has performance and code clarity benefits.
Attachments
patch
(18.41 KB, patch)
2011-09-06 02:04 PDT
,
Antti Koivisto
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2011-09-06 02:04:57 PDT
Created
attachment 106399
[details]
patch
Sam Weinig
Comment 2
2011-09-06 08:03:27 PDT
What speedups did you see?
Antti Koivisto
Comment 3
2011-09-06 08:25:57 PDT
(In reply to
comment #2
)
> What speedups did you see?
Together with the earlier recalcStyle() de-virtualization, this seems reduce self-time in recalcStyle() by ~30%.
Dimitri Glazkov (Google)
Comment 4
2011-09-06 08:42:14 PDT
Comment on
attachment 106399
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=106399&action=review
I am pretty sure cutomStyleForRenderer is killable too. It's definitely possible to kill custom style resolution on TextControlInnerElements. I should look at that.
> Source/WebCore/dom/NodeRenderingContext.cpp:303 > + Element* element = node->isElementNode() ? toElement(node) : 0; > + if (element) > + m_context.setStyle(element->styleForRenderer()); > + else if (RenderObject* parentRenderer = m_context.parentRenderer()) > + m_context.setStyle(parentRenderer->style());
This is much cleaner, thanks!
Antti Koivisto
Comment 5
2011-09-06 11:11:55 PDT
(In reply to
comment #4
)
> I am pretty sure cutomStyleForRenderer is killable too. It's definitely possible to kill custom style resolution on TextControlInnerElements. I should look at that.
Yeah, it mostly looks like bs.
Antti Koivisto
Comment 6
2011-09-07 03:15:48 PDT
http://trac.webkit.org/changeset/94659
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