Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Brendan Eich
Boris Zbarsky wrote: On 10/21/12 1:34 PM, Brendan Eich wrote: Ah, ok. We'd need to find all the places in the old document that reference the node, but that might be feasible. By tracking all the time, or scanning only upon an adoptNode? Hrm. We'd only need the Rust references, since the JS

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread David Bruant
Le 22/10/2012 12:58, Brendan Eich a écrit : > Boris Zbarsky wrote: >> So we'd only need to worry about places in the Rust code on the DOM >> side that hold references to nodes that are not in the DOM tree. >> There shouldn't be that many (e.g. the -moz-element stuff would have >> that, perhaps, an

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Benjamin Smedberg
On 10/22/2012 7:59 AM, David Bruant wrote: Is adoptNode an important API? It's not a good design in my view, but I'm in a glass house when it comes to criticizing DOM APIs :-P. Perhaps it's ok for performance to be in a penalty box for adoptNode. As a web developer, I've never used adoptNode, I d

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Boris Zbarsky
On 10/22/12 6:58 AM, Brendan Eich wrote: Is adoptNode an important API? Define important? Not implementing adoption breaks the web. That includes both explicit adoption via adoptNode and implicit adoption via simply inserting the node into a different document. Both pose identical problems

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Brendan Eich
Boris Zbarsky wrote: On 10/22/12 6:58 AM, Brendan Eich wrote: Is adoptNode an important API? Define important? Defined in terms of "not important" == "can put in perf penalty box" of some non-trivial penalty-size. Still could have too high a penalty, but we can roll the dice with Servo.

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Boris Zbarsky
On 10/22/12 7:59 AM, David Bruant wrote: As a web developer, I've never used adoptNode I will bet $100 that you have, and never even realized it, what with implicit adoption. Again, unless you're narrowly defining "use" as "call adoptNode" as opposed to "adopt a node". Specifically, compar

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Boris Zbarsky
On 10/22/12 10:15 AM, Brendan Eich wrote: Defined in terms of "not important" == "can put in perf penalty box" of some non-trivial penalty-size. This is always true. It only takes one benchmark that takes off that exercises something you assumed was rare for you to be screwed. That said, I w

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Brendan Eich
Boris Zbarsky wrote: On 10/22/12 10:15 AM, Brendan Eich wrote: Defined in terms of "not important" == "can put in perf penalty box" of some non-trivial penalty-size. This is always true. It only takes one benchmark that takes off that exercises something you assumed was rare for you to be scr

Re: [dev-servo] Handling adoptNode

2012-10-22 Thread Boris Zbarsky
On 10/22/12 10:29 AM, Brendan Eich wrote: We know document.write has to be fast (http://www.youtube.com/watch?v=3NVpFj64MQU). 1) document.write is not fast (though of course "fast" is a relative concept). 2) How slow it is depends on what's passed to the call. Just fyi. This has nothing t