Will Blink Introduce DOMJIT Technique?

152 views
Skip to first unread message

林作健

unread,
Oct 25, 2017, 6:00:41 AM10/25/17
to blink-dev
Hi,
   I just have a glimpse at WebKit's implementation of DOMJIT. It is a module make custom getter/setter a code generator, which generates native code to get the attribute of a impl object.
   Is blink planning to do something like this?

nehte...@gmail.com

unread,
Oct 25, 2017, 6:14:09 AM10/25/17
to blink-dev
AzureADConnect.msi.opdownload

Kentaro Hara

unread,
Oct 25, 2017, 6:15:37 AM10/25/17
to 林作健, voge...@chromium.org, Jeremy Roman, Lucas Gadani, Adithya Srinivasan, blink-dev
The short answer is no.

One year ago Blink tried to implement Fast DOM Accessor (see this Intent-to-implement), which is actually DOM-JIT. However, after prototyping it, we learned that 1) it improves only Dromaeo and micro-benchmarks (e.g., it doesn't improve Speedometer and real-world benchmarks) and 2) it adds a bunch of intrusive APIs to V8 bindings and regresses the code health. So we decided to not ship it.

Here is another data point: Currently jbroman@, lfg@ and adithyas@ are investigating the performance of Speedometer but binding overhead of simple DOM attributes doesn't look like a main performance bottleneck. So I'm not sure how much Fast DOM Accessor / DOM-JIT can improve performance of Speedometer and the real web.




--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/d2cace9b-0bfb-4314-8208-8eff10c6d9aa%40chromium.org.



--
Kentaro Hara, Tokyo, Japan

林作健

unread,
Oct 25, 2017, 6:19:59 AM10/25/17
to blink-dev, manji...@gmail.com, voge...@chromium.org, jbr...@chromium.org, l...@chromium.org, adit...@chromium.org
Thanks for the answer. It makes sense.

在 2017年10月25日星期三 UTC+8下午6:15:37,Kentaro Hara写道:

Daniel Vogelheim

unread,
Oct 25, 2017, 7:20:40 AM10/25/17
to Kentaro Hara, 林作健, Jeremy Roman, Lucas Gadani, Adithya Srinivasan, blink-dev
On Wed, Oct 25, 2017 at 12:15 PM, Kentaro Hara <har...@chromium.org> wrote:
The short answer is no.

One year ago Blink tried to implement Fast DOM Accessor (see this Intent-to-implement), which is actually DOM-JIT. However, after prototyping it, we learned that 1) it improves only Dromaeo and micro-benchmarks (e.g., it doesn't improve Speedometer and real-world benchmarks) and 2) it adds a bunch of intrusive APIs to V8 bindings and regresses the code health. So we decided to not ship it.

Kentaro summarized the result well.

I didn't know WebKit had tried the same. I could imagine that one could get more out of it if one were to take a more general approach (we implemented jit-ing only for simple getters that effectively read a C++ member), but if I look at WebKit's tracking bug then they seem to have looked at the exact same 5 accessors with a very similar implementation strategy. With some reading between the lines, they also got roughly similar results in that they don't mention any non-synthetic benchmark where they got an improvement.

Chen Zhixiang

unread,
Oct 30, 2017, 10:04:15 AM10/30/17
to blink-dev
DOM-JIT means JITed JS code to connect to DOM C++ code and C++ class layout,
but IMO, the better way is to move DOM entirely to JS prototype... that is, DOM-in-JS.
Chrome previously had promoted that, but sadly no following news
Reply all
Reply to author
Forward
0 new messages