Commit 0df5a88d authored by haraken@chromium.org's avatar haraken@chromium.org

Revert 168383 "Move popular DOM attributes to prototype chains"

This CL regressed performance of Dromaeo/dom-traverse unacceptably.
https://chromeperf.appspot.com/report?masters=ChromiumPerf&bots=chromium-rel-mac6%2Cchromium-rel-mac8%2Cchromium-rel-win7-dual%2Clinux-release&tests=dromaeo.domcoretraverse%2Fdom&checked=core


> Move popular DOM attributes to prototype chains
> 
> Design document: https://docs.google.com/a/google.com/document/d/1yeHTCHhulVIlrKyx9_gCguAhLfcefVOa9uxxfW2LVG0/edit
> 
> Intent-to-ship-and-implement in blink-dev: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/t0XiZuMey7M/9-5AuhoFyisJ
> 
> This CL moves DOM attributes used in Dromaeo to prototype chains. When I landed the CL two months ago (https://codereview.chromium.org/94403002), it caused 20+% regression in benchmarks. However, now that a V8 side fix is landed, there should be no overhead in moving DOM attributes to prototype chains in theory.
> 
> Dromaeo/dom-attr 1086 runs/sec => 1077 runs/sec (-0.8%)
> Dromaeo/dom-modify 522 runs/sec => 525 runs/sec (+0.5%)
> Dromaeo/dom-query 26150 runs/sec => 26200 runs/sec (+0.2%)
> Dromaeo/dom-traverse 564 runs/sec => 544 runs/sec (-3.6%)
> 
> I don't understand the regression in dom-traverse. The regression is reproducible but I cannot reproduce the regression in a super-micro benchmark that just repeats accessing div.firstChild. Probably the regression might be a noise.
> 
> I'm going to land this CL and see how much regression is observed in perf bots (I'll email to perf-sheriff@). If I find the regression is unacceptable, I'll revert the CL.
> 
> See the design document and the Intent-to-ship email for justification for the regression.
> 
> BUG=43394
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167680
> 
> R=jochen@chromium.org
> 
> Review URL: https://codereview.chromium.org/158713002

TBR=haraken@chromium.org

Review URL: https://codereview.chromium.org/187343006

git-svn-id: svn://svn.chromium.org/blink/trunk@168453 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9774a637
...@@ -108,7 +108,7 @@ callback CustomElementConstructor = Element (); ...@@ -108,7 +108,7 @@ callback CustomElementConstructor = Element ();
[TreatNullAs=NullString, RaisesException] attribute DOMString cookie; [TreatNullAs=NullString, RaisesException] attribute DOMString cookie;
[RaisesException=Setter, CustomElementCallbacks, PerWorldBindings, ExposeJSAccessors] attribute HTMLElement body; [RaisesException=Setter, CustomElementCallbacks, PerWorldBindings] attribute HTMLElement body;
readonly attribute HTMLHeadElement head; readonly attribute HTMLHeadElement head;
readonly attribute HTMLCollection images; readonly attribute HTMLCollection images;
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
[PerWorldBindings] readonly attribute CSSStyleDeclaration style; [PerWorldBindings] readonly attribute CSSStyleDeclaration style;
// DOM4 // DOM4
[Reflect, PerWorldBindings, ExposeJSAccessors] attribute DOMString id; [Reflect, PerWorldBindings] attribute DOMString id;
[TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString namespaceURI; [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString namespaceURI;
[TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, RaisesException=Setter] attribute DOMString prefix; [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, RaisesException=Setter] attribute DOMString prefix;
[TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString localName; [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString localName;
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
// HTML 5 // HTML 5
HTMLCollection getElementsByClassName(DOMString classNames); HTMLCollection getElementsByClassName(DOMString classNames);
[TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds, RaisesException=Setter, ExposeJSAccessors] attribute DOMString innerHTML; [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds, RaisesException=Setter] attribute DOMString innerHTML;
[TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString outerHTML; [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] attribute DOMString outerHTML;
[RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] Element insertAdjacentElement(DOMString where, Element element); [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] Element insertAdjacentElement(DOMString where, Element element);
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
[TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, CustomElementCallbacks] attribute DOMString nodeValue; [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, CustomElementCallbacks] attribute DOMString nodeValue;
[PerWorldBindings, ExposeJSAccessors] readonly attribute unsigned short nodeType; [PerWorldBindings] readonly attribute unsigned short nodeType;
[PerWorldBindings, ExposeJSAccessors] readonly attribute Node parentNode; [PerWorldBindings] readonly attribute Node parentNode;
[PerWorldBindings, ExposeJSAccessors] readonly attribute NodeList childNodes; [PerWorldBindings] readonly attribute NodeList childNodes;
[PerWorldBindings, ExposeJSAccessors] readonly attribute Node firstChild; [PerWorldBindings] readonly attribute Node firstChild;
[PerWorldBindings, ExposeJSAccessors] readonly attribute Node lastChild; [PerWorldBindings] readonly attribute Node lastChild;
[PerWorldBindings, ExposeJSAccessors] readonly attribute Node previousSibling; [PerWorldBindings] readonly attribute Node previousSibling;
[PerWorldBindings, ExposeJSAccessors] readonly attribute Node nextSibling; [PerWorldBindings] readonly attribute Node nextSibling;
[PerWorldBindings] readonly attribute Document ownerDocument; [PerWorldBindings] readonly attribute Document ownerDocument;
[Custom, CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds, RaisesException] Node insertBefore(Node newChild, Node refChild); [Custom, CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds, RaisesException] Node insertBefore(Node newChild, Node refChild);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment