[Webkit-unassigned] [Bug 224158] New: Lots of wasted vector capacity via InlineFormattingState

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 3 12:09:46 PDT 2021


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

            Bug ID: 224158
           Summary: Lots of wasted vector capacity via
                    InlineFormattingState
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon.fraser at apple.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Using the patch in bug 186698 and testing on nytimes.com, vectors allocated under InlineFormattingState::InlineFormattingState waste lots of capacity (measured as live allocations with the page loaded):


Wasted capacity: 46656 bytes (used 23904 of 70560 bytes, utilization: 33.88%) - 49 allocations
5   0x3dccd979d WTF::VectorBuffer<WebCore::Layout::LineBox, 10ul, WTF::FastMalloc>::VectorBuffer()
6   0x3dccd9728 WTF::Vector<WebCore::Layout::LineBox, 10ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
7   0x3dccb78d5 WTF::Vector<WebCore::Layout::LineBox, 10ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
8   0x3dccb7857 WebCore::Layout::InlineFormattingState::InlineFormattingState(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
9   0x3dccb7925 WebCore::Layout::InlineFormattingState::InlineFormattingState(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
10  0x3dcc65a89 std::__1::__unique_if<WebCore::Layout::InlineFormattingState>::__unique_single std::__1::make_unique<WebCore::Layout::InlineFormattingState, WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >, WebCore::Layout::LayoutState&>(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
11  0x3dcc6595b decltype(auto) WTF::makeUnique<WebCore::Layout::InlineFormattingState, WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >, WebCore::Layout::LayoutState&>(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
12  0x3dcc5c5ab WebCore::Layout::LayoutState::ensureInlineFormattingState(WebCore::Layout::ContainerBox const&)::$_11::operator()() const


Wasted capacity: 44496 bytes (used 11664 of 56160 bytes, utilization: 20.77%) - 39 allocations
5   0x3dccd979d WTF::VectorBuffer<WebCore::Layout::LineBox, 10ul, WTF::FastMalloc>::VectorBuffer()
6   0x3dccd9728 WTF::Vector<WebCore::Layout::LineBox, 10ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
7   0x3dccb78d5 WTF::Vector<WebCore::Layout::LineBox, 10ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
8   0x3dccb7857 WebCore::Layout::InlineFormattingState::InlineFormattingState(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
9   0x3dccb7925 WebCore::Layout::InlineFormattingState::InlineFormattingState(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
10  0x3dcc65a89 std::__1::__unique_if<WebCore::Layout::InlineFormattingState>::__unique_single std::__1::make_unique<WebCore::Layout::InlineFormattingState, WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >, WebCore::Layout::LayoutState&>(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
11  0x3dcc6595b decltype(auto) WTF::makeUnique<WebCore::Layout::InlineFormattingState, WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >, WebCore::Layout::LayoutState&>(WTF::Ref<WebCore::Layout::FloatingState, WTF::RawPtrTraits<WebCore::Layout::FloatingState> >&&, WebCore::Layout::LayoutState&)
12  0x3dcc5c5ab WebCore::Layout::LayoutState::ensureInlineFormattingState(WebCore::Layout::ContainerBox const&)::$_11::operator()() const

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210403/8aa25992/attachment-0001.htm>


More information about the webkit-unassigned mailing list