[dev-servo] Representing mutation of children lists
Hello, I'm currently trying to optimise Node.childList and to do so I need to propagate changes in children of nodes to the corresponding NodeList. I took upon the task of cleaning the mess that are the various virtual methods called on insertion and removal of nodes and introduced a new children_changed() virtual method in #6660 [1] and an enum to represent the mutations: fn children_changed(self, mutation: ChildrenMutation); pub enum ChildrenMutation'a { Append(/* prev */ 'a Node, /* added */ 'a ['a Node]), Insert(/* prev */ 'a Node, /* added */ 'a ['a Node], /* next */ 'a Node), Prepend(/* added */ 'a ['a Node], /* next */ 'a Node), Replace(/* prev */ Option'a Node, /* removed */ 'a Node, /* added */ 'a ['a Node], /* next */ Option'a Node), ReplaceAll(/* removed */ 'a ['a Node], /* added */ 'a ['a Node]), } Does anyone see an immediate problem with this? This might look bad, but I find it quite useful for the actual code in NodeList and it avoids some impossible mutations that can be represented by a naive tuple (previous_node, removed_nodes, added_nodes, next_node), like removing multiple (but not all) children of a node. Regards. [1] https://github.com/servo/servo/pull/6660 ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
Re: [dev-servo] Per-document event queues
Partially related question: are there plans for per-add-on event queue? On 21/07/15 16:31, Josh Matthews wrote: We currently have a model where each eTLD has a separate event queue. This is an improvement over Gecko (one event queue to rule them all), but I suspect we can do better. Specifically, I'm interested in moving to isolated event queues per document, then doing round-robin event processing on each on in an eTLD group. That would make the script event loop look something like this: -- David Rajchenbach-Teller, PhD Performance Team, Mozilla signature.asc Description: OpenPGP digital signature ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
Re: [dev-servo] Per-document event queues
I don't believe anybody has put thought into addons beyond something like Chrome at this point. On 2015-07-23 6:05 PM, David Rajchenbach-Teller wrote: Partially related question: are there plans for per-add-on event queue? On 21/07/15 16:31, Josh Matthews wrote: We currently have a model where each eTLD has a separate event queue. This is an improvement over Gecko (one event queue to rule them all), but I suspect we can do better. Specifically, I'm interested in moving to isolated event queues per document, then doing round-robin event processing on each on in an eTLD group. That would make the script event loop look something like this: ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo
Re: [dev-servo] Per-document event queues
On Fri, Jul 24, 2015 at 10:26 AM, Josh Matthews j...@joshmatthews.net wrote: I don't believe anybody has put thought into addons beyond something like Chrome at this point. FWIW https://bugzilla.mozilla.org/show_bug.cgi?id=1161828 Rob -- lbir ye,ea yer.tnietoehr rdn rdsme,anea lurpr edna e hnysnenh hhe uresyf toD selthor stor edna siewaoeodm or v sstvr esBa kbvted,t rdsme,aoreseoouoto o l euetiuruewFa kbn e hnystoivateweh uresyf tulsa rehr rdm or rnea lurpr .a war hsrer holsa rodvted,t nenh hneireseoouot.tniesiewaoeivatewt sstvr esn ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo