Bug 251726 - LayoutIntegration::BoxTree::m_renderers wastes 16KB of vector capacity
Summary: LayoutIntegration::BoxTree::m_renderers wastes 16KB of vector capacity
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-03 16:20 PST by Simon Fraser (smfr)
Modified: 2023-02-06 09:00 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2023-02-03 16:20:23 PST
Using the patch in bug 186698, and testing on a wikipedia page, we see that LayoutIntegration::BoxTree::m_renderers wastes 16KB of vector capacity:

Wasted capacity: 16016 bytes (used 29136 of 45152 bytes, utilization: 64.53%) - 216 allocations
5   0x82651c1a4 WTF::VectorBuffer<WTF::WeakPtr<WebCore::RenderObject, WTF::DefaultWeakPtrImpl>, 1ul, WTF::FastMalloc>::VectorBuffer()
6   0x82651c135 WTF::Vector<WTF::WeakPtr<WebCore::RenderObject, WTF::DefaultWeakPtrImpl>, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
7   0x8264fa035 WTF::Vector<WTF::WeakPtr<WebCore::RenderObject, WTF::DefaultWeakPtrImpl>, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
8   0x8264f9ec8 WebCore::LayoutIntegration::BoxTree::BoxTree(WebCore::RenderBlock&)
9   0x8264fa90d WebCore::LayoutIntegration::BoxTree::BoxTree(WebCore::RenderBlock&)
10  0x8265479ce WebCore::LayoutIntegration::LineLayout::LineLayout(WebCore::RenderBlockFlow&)
11  0x826547b8d WebCore::LayoutIntegration::LineLayout::LineLayout(WebCore::RenderBlockFlow&)
12  0x827299fde std::__1::__unique_if<WebCore::LayoutIntegration::LineLayout>::__unique_single std::__1::make_unique<WebCore::LayoutIntegration::LineLayout, WebCore::RenderBlockFlow&>(WebCore::RenderBlockFlow&)
Comment 1 Radar WebKit Bug Importer 2023-02-03 16:20:44 PST
<rdar://problem/105025598>
Comment 2 Antti Koivisto 2023-02-06 01:57:12 PST
Pull request: https://github.com/WebKit/WebKit/pull/9680
Comment 3 EWS 2023-02-06 08:59:58 PST
Committed 259895@main (470080c7ba5f): <https://commits.webkit.org/259895@main>

Reviewed commits have been landed. Closing PR #9680 and removing active labels.