Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Issue 684763004: bindings: Fixes perf regression by crrev.com/646523004. (Closed)

Created:
6 years, 1 month ago by Yuki
Modified:
6 years, 1 month ago
Reviewers:
haraken
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink
Project:
blink
Visibility:
Public.

Description

bindings: Fixes perf regression by crrev.com/646523004. Window has custom toV8 function, and Window inherits from EventTarget. So, EventTarget also has custom toV8 because an EventTarget can be a Window. crrev.com/646523004 made Node to call EventTarget-version of v8SetReturnValueForMainWorld because Node inherits from EventTarget, and it calls toV8 function every time. It caused a perf regression. This CL adds a new version of v8SetReturnValueForMainWorld for Node and its subclasses so that they can use the fastest path. class hierarchy: ScriptWrappable <-- EventTarget <--+-- Node <-- ... +-- Window overloads: v8SetReturnValueForMainWorld(ScriptWrappable*) Optimized and very fast. v8SetReturnValueForMainWorld(EventTarget*) Uses custom toV8 function and slow. v8SetReturnValueForMainWorld(Node*) <----------- NEW!! Optimized and very fast. v8SetReturnValueForMainWorld(Window*) Uses custom toV8 function and slow. Before this CL: Element matches EventTarget version of v8SetReturnValueForMainWorld, and it's very slow. After this CL: Element matches Node version of v8SetReturnValueForMainWorld, and it's very fast. BUG=428707, 235436 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184860

Patch Set 1 #

Total comments: 2

Patch Set 2 : Synced. #

Patch Set 3 : Synced. #

Patch Set 4 : Totally changed the approach. Added v8SetReturnValueForMainWorld(Node*). #

Patch Set 5 : Added a comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -0 lines) Patch
M Source/bindings/core/v8/V8Binding.h View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
Yuki
Could you review this CL?
6 years, 1 month ago (2014-10-31 15:25:34 UTC) #2
haraken
LGTM https://codereview.chromium.org/684763004/diff/1/Source/bindings/templates/interface.h File Source/bindings/templates/interface.h (right): https://codereview.chromium.org/684763004/diff/1/Source/bindings/templates/interface.h#newcode191 Source/bindings/templates/interface.h:191: v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContext, v8::Isolate*); Can we rename ...
6 years, 1 month ago (2014-11-01 22:45:50 UTC) #3
Yuki
https://codereview.chromium.org/684763004/diff/1/Source/bindings/templates/interface.h File Source/bindings/templates/interface.h (right): https://codereview.chromium.org/684763004/diff/1/Source/bindings/templates/interface.h#newcode191 Source/bindings/templates/interface.h:191: v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContext, v8::Isolate*); On 2014/11/01 22:45:50, haraken ...
6 years, 1 month ago (2014-11-04 05:48:17 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684763004/20001
6 years, 1 month ago (2014-11-04 05:49:01 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/32146)
6 years, 1 month ago (2014-11-04 05:59:37 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684763004/40001
6 years, 1 month ago (2014-11-04 14:12:51 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/32193)
6 years, 1 month ago (2014-11-04 15:09:54 UTC) #12
haraken
LGTM
6 years, 1 month ago (2014-11-05 09:02:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684763004/80001
6 years, 1 month ago (2014-11-05 09:05:35 UTC) #15
commit-bot: I haz the power
6 years, 1 month ago (2014-11-05 09:50:42 UTC) #16
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as 184860

Powered by Google App Engine
This is Rietveld 408576698