<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>224253</bug_id>
          
          <creation_ts>2021-04-06 17:09:09 -0700</creation_ts>
          <short_desc>CSSValueList inline capacity causes vector wastage</short_desc>
          <delta_ts>2021-04-13 17:10:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1747711</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2021-04-06 17:09:09 -0700</bug_when>
    <thetext>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&amp;, 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&amp;, WebCore::CSSParserContext const&amp;, WTF::Vector&lt;WebCore::CSSProperty, 256ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;, 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&amp;, WebCore::CSSParserImpl::AllowedRulesType)
10  0x106205e06 WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&amp;, WebCore::CSSParserContext const&amp;, WebCore::StyleSheetContents*, WebCore::CSSParser::RuleParsing)
11  0x1061fdd92 WebCore::StyleSheetContents::parseAuthorStyleSheet(WebCore::CachedCSSStyleSheet const*, WebCore::SecurityOrigin const*)
12  0x10650960a WebCore::HTMLLinkElement::setCSSStyleSheet(WTF::String const&amp;, WTF::URL const&amp;, WTF::String const&amp;, WebCore::CachedCSSStyleSheet const*)

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

    Vector&lt;Ref&lt;CSSValue&gt;, 4&gt; m_values;

Many keyframe lists just have 2 keyframes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1749941</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-04-13 17:10:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/76618359&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>