[webkit-reviews] review requested: [Bug 117637] Improve the number of style resolutions for NodeRenderingContext : [Attachment 204813] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 17 05:52:22 PDT 2013


Mihai Maerean <mmaerean at adobe.com> has asked  for review:
Bug 117637: Improve the number of style resolutions for NodeRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=117637

Attachment 204813: patch
https://bugs.webkit.org/attachment.cgi?id=204813&action=review

------- Additional Comments from Mihai Maerean <mmaerean at adobe.com>
This patch reduces the number of style resolutions (an expensive operation) by
checking for
moveToFlowThreadIfNeeded in 2 steps:
* 1st step: we determine if the node is the child of a region.
* 2nd step: after calling shouldCreateRenderer, we call
moveToFlowThreadIfNeeded for all other nodes and, by
that time, the style has already been computed.

The number of style resolutions are as follows:
WHEN OPENING				STYLE RESOLUTIONS WITH THE _OLD_ CODE  
STYLE RESOLUTIONS WITH THE _PATCH_
http://www.whitehouse.gov/		4027				       
3257
http://en.wikipedia.org/wiki/Main_Page	7513				       
5638

The results of running PerformanceTests/Parser/ are as follows:
TEST				UNIT	NEW CODE    DELTA	    OLD CODE
/Parser/textarea-parsing:Runs	runs/s	77.32	    5.72% BETTER    73.14
/Parser/tiny-innerHTML:Runs	runs/s	3.65	    4.81% BETTER    3.48
/Parser/html-parser:Time	ms	2423.15     0.49% BETTER    2435.15
/Parser/css-parser-yui:Runs	runs/s	280.09	    0.44% BETTER    278.87
/Parser/xml-parser:Runs 	runs/s	6.08	    4.85% WORSE     6.39
/Parser/innerHTML-setter:Runs	runs/s	185.71	    4.61% WORSE     194.69


More information about the webkit-reviews mailing list