We can minimize the number of virtual function calls in MarkupAccumulator by: - De-virtualizing MarkupAccumulator::appendString(), which is never overridden - Having MarkupAccumulator::appendEndTag() take an Element in argument instead of a Node, as it only applies to Element. This will force callers to do the isElementNode() check *before* calling the virtual function, instead of calling appendEndTag() unconditionally and have it return early.
Created attachment 238380 [details] Patch
Comment on attachment 238380 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238380&action=review > Source/WebCore/page/PageSerializer.cpp:109 > - virtual void appendEndTag(const Node&) override; > + virtual void appendEndTag(const Element&) override; Instead of adding isElementNode() everywhere, you could have: inline void appendEndTag(Node& node) { if (node.isElementNode()) appendEndTag(toElement(node)); }
Created attachment 238396 [details] Patch
Comment on attachment 238396 [details] Patch Clearing flags on attachment: 238396 Committed r173783: <http://trac.webkit.org/changeset/173783>
All reviewed patches have been landed. Closing bug.