Repository navigation
Add a fast path in Element::SetInnerHTML when the value is small and trivial text - #26398
Conversation
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try=wpt |
Add a fast path in Element::SetInnerHTML when the value is small and trivial text Inspired from gecko which has a similar fast path. This makes innerHTML more than 10 times faster for this case. Fixes #25892
|
💔 Test failed - status-taskcluster |
I have no idea what this test is even supposed to be. There's a 18391 character long line in there with what looks like sha1sums everywhere... 😕 |
|
My guess is that gecko also blacklists The documentation here is missing so I have no idea what they even are. |
4fec5d6 to
207c477
Compare
|
@bors-servo try=wpt |
Add a fast path in Element::SetInnerHTML when the value is small and trivial text Inspired from gecko which has a similar fast path. This makes innerHTML more than 10 times faster for this case. Fixes #25892
|
Judging by https://searchfox.org/mozilla-central/rev/b9a814e53b3b6f5cb665a78f4777868e7a16bfcd/dom/html/HTMLSharedElement.cpp#273-293, HTMLSharedElement looks like a class that is used as the implementation for a bunch of HTML elements that each have one or two custom behaviours to reduce code duplication. |
|
I suspect that you're missing weird parsing mode for the head element, judging by https://searchfox.org/mozilla-central/rev/b9a814e53b3b6f5cb665a78f4777868e7a16bfcd/dom/html/HTMLSharedElement.h#25-27 and the test contents being (pre-decoded) |
|
I was actually missing it for HtmlHtmlElement. With my current patch the test seems to be ok. We'll see if something else is broken |
|
💔 Test failed - status-taskcluster |
Hopefully unrelated :p |
|
I argue that you are also missing it from HTMLHeadElement given the code that I linked :) |
|
Oh wow I somehow missed those lines when I read it... Will add for htmlheadelement |
207c477 to
f01801d
Compare
|
@bors-servo r+ |
|
📌 Commit f01801d has been approved by |
Add a fast path in Element::SetInnerHTML when the value is small and trivial text Inspired from gecko which has a similar fast path. This makes innerHTML more than 10 times faster for this case. Fixes #25892
|
💔 Test failed - status-taskcluster |
…trivial text Inspired from gecko which has a similar fast path. This makes innerHTML more than 10 times faster for this case. Fixes servo#25892
f01801d to
1b2464b
Compare
|
@bors-servo r+ |
|
📌 Commit 1b2464b has been approved by |
|
☀️ Test successful - status-taskcluster |


Inspired from gecko which has a similar fast path. This makes innerHTML
more than 10 times faster for this case.
Fixes #25892