Bug 251725 - FloatingState::m_floats wastes 30KB of vector capacity
Summary: FloatingState::m_floats wastes 30KB 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: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-03 16:16 PST by Simon Fraser (smfr)
Modified: 2023-02-06 12:46 PST (History)
5 users (show)

See Also:


Attachments
Patch (4.28 KB, patch)
2023-02-06 10:02 PST, zalan
no flags Details | Formatted Diff | Diff

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:16:58 PST
Using the patch in bug 186698, and testing on a wikipedia page, we see that FloatingState::m_floats wastes 30KB of vector capacity:

Wasted capacity: 30888 bytes (used 2392 of 33280 bytes, utilization: 7.19%) - 216 allocations
5   0x82646e57d WTF::VectorBuffer<WebCore::Layout::FloatingState::FloatItem, 0ul, WTF::FastMalloc>::VectorBuffer()
6   0x82646e545 WTF::Vector<WebCore::Layout::FloatingState::FloatItem, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
7   0x82644b9c5 WTF::Vector<WebCore::Layout::FloatingState::FloatItem, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::Vector()
8   0x82644b91d WebCore::Layout::FloatingState::FloatingState(WebCore::Layout::LayoutState&, WebCore::Layout::ElementBox const&)
9   0x82644ba15 WebCore::Layout::FloatingState::FloatingState(WebCore::Layout::LayoutState&, WebCore::Layout::ElementBox const&)
10  0x826460b4c WebCore::Layout::BlockFormattingState::BlockFormattingState(WebCore::Layout::LayoutState&, WebCore::Layout::ElementBox const&)
11  0x826460be5 WebCore::Layout::BlockFormattingState::BlockFormattingState(WebCore::Layout::LayoutState&, WebCore::Layout::ElementBox const&)
Comment 1 Radar WebKit Bug Importer 2023-02-03 16:17:18 PST
<rdar://problem/105025457>
Comment 2 zalan 2023-02-06 10:02:01 PST
Created attachment 464866 [details]
Patch
Comment 3 EWS 2023-02-06 12:46:31 PST
Committed 259909@main (f2ad1fd561f5): <https://commits.webkit.org/259909@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 464866 [details].