[Webkit-unassigned] [Bug 111789] New: HTMLTreeBuilder::ExternalCharacterTokenBuffer should not need to copy bytes in the CompactHTMLToken case

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 7 16:07:24 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=111789

           Summary: HTMLTreeBuilder::ExternalCharacterTokenBuffer should
                    not need to copy bytes in the CompactHTMLToken case
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: abarth at webkit.org, tonyg at chromium.org
            Blocks: 111645


HTMLTreeBuilder::ExternalCharacterTokenBuffer should not need to copy bytes in the CompactHTMLToken case

CompactHTMLToken has already allocated a StringImpl of the right size in the common case.  We need to plumb this information through AtomicHTMLToken so that ExternalCharacterTokenBuffer can avoid copying the bytes and instead just ref the StringImpl. :)

e.g.
        m_tree.insertTextNode(buffer.takeRemaining());

profiling Parser/html-parser-threaded.html with bug 107236 applied:

Running Time    Self        Symbol Name
84.2ms    4.8%    84.2         WTF::fastMalloc(unsigned long)
19.6ms    1.1%    0.0          WTF::StringImpl::createUninitialized(unsigned int, unsigned char*&)
17.7ms    1.0%    0.0           WTF::String::make8BitFrom16BitSource(unsigned short const*, unsigned long)
8.3ms    0.4%    0.0            WebCore::HTMLTreeBuilder::processCharacterBufferForInBody(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer&)

The .4% spent in HTMLTreeBuilder::processCharacterBufferForInBody are likely all unnecessary.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list