Bug 224253 - CSSValueList inline capacity causes vector wastage
Summary: CSSValueList inline capacity causes vector wastage
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-06 17:09 PDT by Simon Fraser (smfr)
Modified: 2021-04-13 17:10 PDT (History)
3 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) 2021-04-06 17:09:09 PDT
Total capacity: 35648 bytes (used 11024, wasted 24624), utilization: 30.92%) - 1090 allocations, entry size 8 bytes
1   0x1061c4ac0 WebCore::CSSValueList::CSSValueList(WebCore::CSSValue::ValueSeparator)
2   0x106227bf8 WebCore::CSSPropertyParser::consumeAnimationShorthand(WebCore::StylePropertyShorthand const&, bool)
3   0x10622517b WebCore::CSSPropertyParser::parseShorthand(WebCore::CSSPropertyID, bool)
4   0x10621764b WebCore::CSSPropertyParser::parseValueStart(WebCore::CSSPropertyID, bool)
5   0x106215db1 WebCore::CSSPropertyParser::parseValue(WebCore::CSSPropertyID, bool, WebCore::CSSParserTokenRange const&, WebCore::CSSParserContext const&, WTF::Vector<WebCore::CSSProperty, 256ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&, WebCore::StyleRuleType)
6   0x10620eff1 WebCore::CSSParserImpl::consumeDeclaration(WebCore::CSSParserTokenRange, WebCore::StyleRuleType)
7   0x10620d3d2 WebCore::CSSParserImpl::consumeDeclarationList(WebCore::CSSParserTokenRange, WebCore::StyleRuleType)
8   0x1062109bc WebCore::CSSParserImpl::consumeStyleRule(WebCore::CSSParserTokenRange, WebCore::CSSParserTokenRange)
9   0x10620de75 WebCore::CSSParserImpl::consumeQualifiedRule(WebCore::CSSParserTokenRange&, WebCore::CSSParserImpl::AllowedRulesType)
10  0x106205e06 WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&, WebCore::CSSParserContext const&, WebCore::StyleSheetContents*, WebCore::CSSParser::RuleParsing)
11  0x1061fdd92 WebCore::StyleSheetContents::parseAuthorStyleSheet(WebCore::CachedCSSStyleSheet const*, WebCore::SecurityOrigin const*)
12  0x10650960a WebCore::HTMLLinkElement::setCSSStyleSheet(WTF::String const&, WTF::URL const&, WTF::String const&, WebCore::CachedCSSStyleSheet const*)

35KB wasted on YouTube.com because CSSValueList has inline capacity:

    Vector<Ref<CSSValue>, 4> m_values;

Many keyframe lists just have 2 keyframes.
Comment 1 Radar WebKit Bug Importer 2021-04-13 17:10:17 PDT
<rdar://problem/76618359>