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

Issue 697603002: Optimized nodeType dom binding by removing HandleScope and the preparation of ordinary c function c… (Closed)

Created:
6 years, 1 month ago by yaojie.yan
Modified:
4 years, 7 months ago
CC:
v8-dev, Paweł Hajdan Jr.
Base URL:
https://chromium.googlesource.com/external/v8.git@master
Project:
v8
Visibility:
Public.

Description

Optimized nodeType dom binding by removing HandleScope and the preparation of ordinary c function call. In nodeType getter callback, it does not New objects, so it’s safe to remove HandleScope(). And in ordinary C function, it create a new frame(push ebp/pop ebp) to store arguments. But for some straightforward getter, like nodeTypeAttributeGetter, By removing this preparation, it can improve nodeType api performance by 30%. BUG=v8:3667

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -3 lines) Patch
M include/v8.h View 3 chunks +22 lines, -0 lines 0 comments Download
M src/api.h View 3 chunks +4 lines, -0 lines 0 comments Download
M src/api.cc View 4 chunks +34 lines, -3 lines 0 comments Download
M src/code-stubs.h View 2 chunks +9 lines, -0 lines 0 comments Download
M src/ic/x64/handler-compiler-x64.cc View 3 chunks +12 lines, -0 lines 0 comments Download
M src/objects.h View 2 chunks +5 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 chunk +11 lines, -0 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 chunk +54 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 chunk +11 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 chunk +79 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
yaojie.yan
In the binding side, the jit hint can be set as below: v8::Local<v8::Accessor> ac = ...
6 years, 1 month ago (2014-10-31 08:03:43 UTC) #3
dcarney
> Could you help to review it? and thanks very much for any of your ...
6 years, 1 month ago (2014-10-31 08:37:50 UTC) #4
yaojie.yan
6 years, 1 month ago (2014-10-31 08:50:41 UTC) #5
On 2014/10/31 08:37:50, dcarney wrote:
> > Could you help to review it? and thanks very much for any of your comments.
> 
> this is fundamentally okay, and indeed it's something i've thought about
before,
> but it creates an api that's easy to break.  If you forget to create a handle
> scope in the callback if you happen to need one, very bad things can happen,
and
> they would be hard to track down. 
[Based on my current knowledge, it should work in this case, because the new
handler will be maintained by their parent's handerScope in most case, I will
verify this case.]
 We have an overall strategy for this type of
> case, and it's to never leave javascript and perform the dom operations
directly
> there, instead of trying to optimize the cost of calling out to c.
[Do you mean Blink-In-JavaScript by the overall strategy?]

Powered by Google App Engine
This is Rietveld 408576698