RESOLVED FIXED 221535
Reduce the overhead of DocumentFragment in innerHTML & outerHTML
https://bugs.webkit.org/show_bug.cgi?id=221535
Summary Reduce the overhead of DocumentFragment in innerHTML & outerHTML
Ryosuke Niwa
Reported 2021-02-07 19:44:28 PST
We should cache DocumentFragment used in innerHTML and outerHTML, and avoid calling removedFromAncestor on each node when removing from DocumentFragment.
Attachments
WIP (8.52 KB, patch)
2021-02-07 19:48 PST, Ryosuke Niwa
no flags
Patch (13.30 KB, patch)
2021-02-09 17:36 PST, Ryosuke Niwa
ews-feeder: commit-queue-
Patch (13.29 KB, patch)
2021-02-09 18:20 PST, Ryosuke Niwa
ggaren: review+
ews-feeder: commit-queue-
Ryosuke Niwa
Comment 1 2021-02-07 19:48:15 PST
Ryosuke Niwa
Comment 2 2021-02-07 19:49:26 PST
Ryosuke Niwa
Comment 3 2021-02-09 17:36:53 PST
Ryosuke Niwa
Comment 4 2021-02-09 18:20:05 PST
Geoffrey Garen
Comment 5 2021-02-09 20:56:03 PST
Comment on attachment 419802 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419802&action=review r=me > Source/WTF/wtf/WeakPtr.h:180 > + bool hasWeakReferences() const { return m_impl; } I would call this isInitialized(). Knowing that m_impl is non-null only tells us that someone created a reference at some point - not that the reference still exists.
Ryosuke Niwa
Comment 6 2021-02-09 21:19:09 PST
(In reply to Geoffrey Garen from comment #5) > Comment on attachment 419802 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=419802&action=review > > r=me > > > Source/WTF/wtf/WeakPtr.h:180 > > + bool hasWeakReferences() const { return m_impl; } > > I would call this isInitialized(). > > Knowing that m_impl is non-null only tells us that someone created a > reference at some point - not that the reference still exists. Good point. The alternative name I had considered as hasEverCreatedWeakPtr but maybe isInitialized okay although it's really hasBeenInitialized
Ryosuke Niwa
Comment 7 2021-02-10 19:18:48 PST
Note You need to log in before you can comment on or make changes to this bug.