Bug 251699 - FormattingState::m_outOfFlowBoxes wastes a lot of vector capacity
Summary: FormattingState::m_outOfFlowBoxes wastes a lot of vector capacity
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-03 10:26 PST by Simon Fraser (smfr)
Modified: 2023-02-03 16:14 PST (History)
4 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 10:26:32 PST
Using the patch in bug 186698, and testing on a wikipedia page, we see that EventListenerMap::m_entries is the second-most wasteful site for vector capacity:

Wasted capacity: 1293768 bytes (used 321640 of 1615408 bytes, utilization: 19.91%) - 219 allocations
1   0x11045bc0f WebCore::Layout::InlineFormattingState::InlineFormattingState(WebCore::Layout::LayoutState&)
2   0x11043d1fa WebCore::Layout::LayoutState::ensureInlineFormattingState(WebCore::Layout::ElementBox const&)

Wasted capacity: 27456 bytes (used 2112 of 29568 bytes, utilization: 7.14%) - 219 allocations
1   0x11044c8b9 WebCore::Layout::BlockFormattingState::BlockFormattingState(WebCore::Layout::LayoutState&, WebCore::Layout::ElementBox const&)
2   0x11043d41f WebCore::Layout::LayoutState::ensureBlockFormattingState(WebCore::Layout::ElementBox const&)
Comment 1 Radar WebKit Bug Importer 2023-02-03 10:27:04 PST
<rdar://problem/105011234>
Comment 2 Simon Fraser (smfr) 2023-02-03 10:28:27 PST
(In reply to Simon Fraser (smfr) from comment #0)
> Using the patch in bug 186698, and testing on a wikipedia page, we see that
> EventListenerMap::m_entries is the second-most wasteful site for vector
> capacity:

That should say "FormattingState::m_outOfFlowBoxes"
Comment 3 Simon Fraser (smfr) 2023-02-03 16:14:15 PST
This was based on bad data.