I'd like to discuss this further in a meeting...
My questions are why is the tree viewer blink in JS? It seems like it could just be plain JS in the page, at worst just plain JS in an extension world. No extra private script system should be needed.
I'd like to also consider moving marquee back to C++.
- E
I'd like to also consider moving marquee back to C++.
- E
I don't think V8 extras is a good fit for what Blink-in-JS is currently being used for. V8 extras are designed for JS libraries such as Streams or URL that we want to have in every context.
DOMPoint & DOMMatrix are purely POD. You could argue that making them available to all contexts is a bit odd, but won't hurt.
Why would we want to inject the XMLTreeViewer into every single context (given it's probably close to zero usage...)?
DOMPoint & DOMMatrix are purely POD. You could argue that making them available to all contexts is a bit odd, but won't hurt.Per the discussion in this CL, it looks like that people want to use V8 extras for DOMPoint/DOMMatrix to bypass the (slow) C++ binding layer. Is this an expected usage of V8 extras?
Why would we want to inject the XMLTreeViewer into every single context (given it's probably close to zero usage...)?No strong reason. I was thinking that V8 extras is a generalized mechanism to run JavaScript in a specified context, so it would make sense to just move XMLTreeViewer to V8 extra (regardless of the usage).Is there any cost in installing V8 extra in a context? Or more generally, what's the criteria where we should use V8 extra and we shouldn't?
On Mon, Feb 29, 2016 at 9:11 AM Kentaro Hara <har...@chromium.org> wrote:DOMPoint & DOMMatrix are purely POD. You could argue that making them available to all contexts is a bit odd, but won't hurt.Per the discussion in this CL, it looks like that people want to use V8 extras for DOMPoint/DOMMatrix to bypass the (slow) C++ binding layer. Is this an expected usage of V8 extras?that sounds like a very poor reason. I'd rather spend energy on making our C++ binding layer as fast as JS.Why would we want to inject the XMLTreeViewer into every single context (given it's probably close to zero usage...)?No strong reason. I was thinking that V8 extras is a generalized mechanism to run JavaScript in a specified context, so it would make sense to just move XMLTreeViewer to V8 extra (regardless of the usage).Is there any cost in installing V8 extra in a context? Or more generally, what's the criteria where we should use V8 extra and we shouldn't?You can't not install V8 extras in a context. V8 extras are part of the snapshot, so every context gets them.I'd propose the following criterium: V8 extras should be used for stuff where you think "Maybe I should bring this to TC39, but maybe they'll push back because it's not a core language feature".
On Mon, Feb 29, 2016 at 5:21 PM, Jochen Eisinger <joc...@chromium.org> wrote:On Mon, Feb 29, 2016 at 9:11 AM Kentaro Hara <har...@chromium.org> wrote:DOMPoint & DOMMatrix are purely POD. You could argue that making them available to all contexts is a bit odd, but won't hurt.Per the discussion in this CL, it looks like that people want to use V8 extras for DOMPoint/DOMMatrix to bypass the (slow) C++ binding layer. Is this an expected usage of V8 extras?that sounds like a very poor reason. I'd rather spend energy on making our C++ binding layer as fast as JS.Why would we want to inject the XMLTreeViewer into every single context (given it's probably close to zero usage...)?No strong reason. I was thinking that V8 extras is a generalized mechanism to run JavaScript in a specified context, so it would make sense to just move XMLTreeViewer to V8 extra (regardless of the usage).Is there any cost in installing V8 extra in a context? Or more generally, what's the criteria where we should use V8 extra and we shouldn't?You can't not install V8 extras in a context. V8 extras are part of the snapshot, so every context gets them.I'd propose the following criterium: V8 extras should be used for stuff where you think "Maybe I should bring this to TC39, but maybe they'll push back because it's not a core language feature".Thanks for the clarification! That's interesting :)A couple of questions:- "Maybe I should bring this to TC39, but maybe they'll push back because it's not a core language feature" sounds like it's not yet a well-established feature, which implies that the usage is still low. Does it make sense to put such a low-usage feature into a v8 snapshot (and thus put it to every context)?
- I think it's an interesting idea to use V8 extras to bypass the overhead of the C++ binding layer (it's a kind of a generalized version of the fast DOM accessor; i.e., it can allow V8 to access DOM attributes/methods without leaving the JIT code). I understand that the current V8 extras are not suitable for the purpose because it's contained in the snapshot, but do you think that the idea of bypassing the C++ binding layer is worth investigating (if people on the DOMMatrix CL prove that V8 extras is a clear performance win for the matrix multiplication)?
On Mon, Feb 29, 2016 at 9:49 AM Kentaro Hara <har...@chromium.org> wrote:On Mon, Feb 29, 2016 at 5:21 PM, Jochen Eisinger <joc...@chromium.org> wrote:On Mon, Feb 29, 2016 at 9:11 AM Kentaro Hara <har...@chromium.org> wrote:DOMPoint & DOMMatrix are purely POD. You could argue that making them available to all contexts is a bit odd, but won't hurt.Per the discussion in this CL, it looks like that people want to use V8 extras for DOMPoint/DOMMatrix to bypass the (slow) C++ binding layer. Is this an expected usage of V8 extras?that sounds like a very poor reason. I'd rather spend energy on making our C++ binding layer as fast as JS.Why would we want to inject the XMLTreeViewer into every single context (given it's probably close to zero usage...)?No strong reason. I was thinking that V8 extras is a generalized mechanism to run JavaScript in a specified context, so it would make sense to just move XMLTreeViewer to V8 extra (regardless of the usage).Is there any cost in installing V8 extra in a context? Or more generally, what's the criteria where we should use V8 extra and we shouldn't?You can't not install V8 extras in a context. V8 extras are part of the snapshot, so every context gets them.I'd propose the following criterium: V8 extras should be used for stuff where you think "Maybe I should bring this to TC39, but maybe they'll push back because it's not a core language feature".Thanks for the clarification! That's interesting :)A couple of questions:- "Maybe I should bring this to TC39, but maybe they'll push back because it's not a core language feature" sounds like it's not yet a well-established feature, which implies that the usage is still low. Does it make sense to put such a low-usage feature into a v8 snapshot (and thus put it to every context)?It's not about being established or not, and we want streams and url in every context.This is actually what happened with the streams API - it's a pure JS thing, so whatwg was hesitant to spec this - for fetch, they just need any streams API, there are no specific requirements.For TC39, however, streams is purely syntactic sugar, so they didn't want to spec it either.