<?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>25656</bug_id>
          
          <creation_ts>2009-05-08 16:56:46 -0700</creation_ts>
          <short_desc>Reduce the size of CSSParserValueList</short_desc>
          <delta_ts>2009-05-08 17:53:42 -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>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></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="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>hyatt</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>120490</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-05-08 16:56:46 -0700</bug_when>
    <thetext>CSSParserValueList is 544 bytes in 64-bit, and accounts for about 2.4MB of churn when running the PLTs. I think the vector of m_values can uses a smaller initial buffer size.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120491</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-05-08 17:03:51 -0700</bug_when>
    <thetext>I browsed some common sites, and the frequency distribution of the high water mark of the m_values size is:

1   20717
2   864
3   1166
4   1380
5   293
6   121
7   26
8   8
9   9
10  2
11  2
12  7
13  1

So a size of 4 will include 98% of cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120494</commentid>
    <comment_count>2</comment_count>
      <attachid>30149</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-05-08 17:20:13 -0700</bug_when>
    <thetext>Created attachment 30149
Patch, changelog

I ran the PLTs with this patch, and was not able to detect any performance decrease.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120495</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-05-08 17:53:42 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/43423</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>30149</attachid>
            <date>2009-05-08 17:20:13 -0700</date>
            <delta_ts>2009-05-08 17:49:14 -0700</delta_ts>
            <desc>Patch, changelog</desc>
            <filename>25656_patch.txt</filename>
            <type>text/plain</type>
            <size>1020</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
ZDk5YTY1Yy4uYzMzY2RiZCAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNCBAQAorMjAwOS0wNS0wOCAgU2ltb24gRnJhc2Vy
ICA8c2ltb24uZnJhc2VyQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkg
KE9PUFMhKS4KKyAgICAgICAgCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD0yNTY1NgorICAgICAgICAKKyAgICAgICAgUmVkdWNlIHRoZSBpbmxpbmUgY2Fw
YWNpdHkgb2YgQ1NTUGFyc2VyVmFsdWVMaXN0J3MgbV92YWx1ZXMKKyAgICAgICAgdmVjdG9yIHRv
IHJlZHVjZSB0aGUgc2l6ZSBvZiBDU1NQYXJzZXJWYWx1ZUxpc3QgZnJvbSA1NDQgdG8gMTYwIGJ5
dGVzIGluIDY0LWJpdC4KKworICAgICAgICAqIGNzcy9DU1NQYXJzZXJWYWx1ZXMuaDoKKwogMjAw
OS0wNS0wOCAgRGFuIEJlcm5zdGVpbiAgPG1pdHpAYXBwbGUuY29tPgogCiAgICAgICAgIFJldmll
d2VkIGJ5IE1hY2llaiBTdGFjaG93aWFrLgpkaWZmIC0tZ2l0IGEvV2ViQ29yZS9jc3MvQ1NTUGFy
c2VyVmFsdWVzLmggYi9XZWJDb3JlL2Nzcy9DU1NQYXJzZXJWYWx1ZXMuaAppbmRleCA0ZTBhMjgw
Li4yNGJkOWI3IDEwMDY0NAotLS0gYS9XZWJDb3JlL2Nzcy9DU1NQYXJzZXJWYWx1ZXMuaAorKysg
Yi9XZWJDb3JlL2Nzcy9DU1NQYXJzZXJWYWx1ZXMuaApAQCAtODMsNyArODMsNyBAQCBwdWJsaWM6
CiAgICAgYm9vbCBjb250YWluc1ZhcmlhYmxlcygpIGNvbnN0IHsgcmV0dXJuIG1fdmFyaWFibGVz
Q291bnQ7IH0KIAogcHJpdmF0ZToKLSAgICBWZWN0b3I8Q1NTUGFyc2VyVmFsdWUsIDE2PiBtX3Zh
bHVlczsKKyAgICBWZWN0b3I8Q1NTUGFyc2VyVmFsdWUsIDQ+IG1fdmFsdWVzOwogICAgIHVuc2ln
bmVkIG1fY3VycmVudDsKICAgICB1bnNpZ25lZCBtX3ZhcmlhYmxlc0NvdW50OwogfTsK
</data>
<flag name="review"
          id="15148"
          type_id="1"
          status="+"
          setter="mitz"
    />
          </attachment>
      

    </bug>

</bugzilla>