Open Bug 1423829 Opened 8 years ago Updated 3 years ago

Consider moving handling of "is" attribute from nsNodeUtils::CloneAndAdopt to FragmentOrElement::CopyInnerTo

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox59 --- affected

People

(Reporter: edgar, Unassigned)

References

(Blocks 1 open bug)

Details

Test: https://edgarchen.github.io/tests/CustomElements/microbenchmarks/cloneNode_no_ce.html Revision: f2b3bed28c50 + bug 1421544 + bug 1392974 Profile with pref on: https://perf-html.io/public/65a85c51ba650f20f6a81f3879bb0b73fe2329a5/calltree/?hiddenThreads=&invertCallstack&range=5.4339_11.3721&thread=4&threadOrder=0-2-3-4-1&v=2 From the profile, I found we spend a little bit time for https://searchfox.org/mozilla-central/rev/f5f1c3f294f89cfd242c3af9eb2c40d19d5e04e7/dom/base/nsNodeUtils.cpp#472 even when we are cloning a normal element. At first glance, we probably could move those code to FragmentOrElement::CopyInnerTo where we copy the attribute to the cloned element which could save the additional GetAttr() call. This might make cloneNode() on a normal node a little bit faster.
Assignee: nobody → echen
Blocks: custom-elements
No longer blocks: 1396567
Assignee: echen → nobody
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.