Closed Bug 1830986 Opened 2 years ago Closed 2 years ago

Improve performance of inner/outerHTML getters.

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

One thing that stands out of the profiles in bug 1827132 are a ton of string allocations and attribute lookups.

Those seem optimizable rather easily, unless I'm missing something.

One thing that stands out of the profiles in bug 1827132 are a ton of
allocations and attribute lookups.

While the root cause of that performance issue is likely to be a
DOMSubtreeModified event that Chrome doesn't fire or so, those are
rather easy to optimize and might be more generally useful.

I removed handling of <br type="">, because editor no longer uses it.
Maybe we can also remove some of the other of the prefixed attribute
shenanigans.

I think nodes that use these are really native-anonymous largely. So
this should be fine, but try is acting up today so if there's any test
failure we can re-evaluate / move to a separate bug as needed.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2edf3ce20ce Avoid a bunch of allocations in innerHTML / outerHTML getter. r=smaug https://hg.mozilla.org/integration/autoland/rev/2319731dcff2 Minor StringBuilder clean-ups. r=smaug https://hg.mozilla.org/integration/autoland/rev/f56cd69dbabd Make a more precise decision on the StringBuilder unit size. r=smaug
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: