New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 667237 link

Starred by 6 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Use cacheable accessors for more DOM attributes

Project Member Reported by haraken@chromium.org, Nov 21 2016

Issue description

[CachedAccessor] allows V8 to access simple DOM attribute getters without leaving JIT code. We should use [CachedAccessor] on more DOM attributes.

https://groups.google.com/a/chromium.org/forum/#!topic/Blink-dev/OhIFnre7ytQ

However, the problem of the current implementation of [CachedAccessor] is that we cannot install a cached accessor lazily. For example, if we want to use a cached accessor for window.foo, we must install the cached accessor when the window's wrapper gets instantiated. Not only does this slow down the wrapper instantiation but also increase memory footprints unnecessarily (because we need to eagerly create the cache entry). Ideally the cached accessor should be installed at the first time when window.foo is accessed.

With that change, we can increase the usage of [CachedAccessor]. And we should.

 
Status: Available (was: Untriaged)
Cc: nverne@google.com
nverne@ is happy to take over this one!

Nicholas:

- This is a CL that implemented the (eager) cacheable accessor on the V8 side: https://codereview.chromium.org/2405213002/

- This is a CL that used the cacheable accessor for window.document: https://codereview.chromium.org/2429343004/

- For V8-side changes, vogelheim@ and jochen@ would be the best reviewers. For Blink-side changes, yukishiino@ and haraken@ would be the best reviewers.


Comment 3 by nverne@chromium.org, Nov 28 2016

Cc: shans@chromium.org
Taking this bug as a starter project in Blink. Shane Stephens will be my buddy. 

Comment 4 by nverne@chromium.org, Nov 29 2016

Status: Started (was: Available)

Comment 5 by nverne@chromium.org, Jan 16 2017

Owner: nverne@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d7f527777c460aba06cf33eaf5d8d61205a2e09

commit 8d7f527777c460aba06cf33eaf5d8d61205a2e09
Author: nverne <nverne@chromium.org>
Date: Thu May 11 08:38:11 2017

AccessorConfiguration and AttributeConfiguration no longer need the same fields.
This saves a cache_key_name field in every AttributeConfiguration.

run-bindings-tests --reset-results

BUG=667237

Review-Url: https://codereview.chromium.org/2875583002
Cr-Commit-Position: refs/heads/master@{#470876}

[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
[modify] https://crrev.com/8d7f527777c460aba06cf33eaf5d8d61205a2e09/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Comment 7 by nverne@chromium.org, May 31 2017

Owner: ----
Status: Available (was: Started)
This issue has been marked as started, but has no owner. Making available.

Sign in to add a comment