Bug 25656 - Reduce the size of CSSParserValueList
Summary: Reduce the size of CSSParserValueList
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-08 16:56 PDT by Simon Fraser (smfr)
Modified: 2009-05-08 17:53 PDT (History)
1 user (show)

See Also:


Attachments
Patch, changelog (1020 bytes, patch)
2009-05-08 17:20 PDT, Simon Fraser (smfr)
mitz: review+
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) 2009-05-08 16:56:46 PDT
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.
Comment 1 Simon Fraser (smfr) 2009-05-08 17:03:51 PDT
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.
Comment 2 Simon Fraser (smfr) 2009-05-08 17:20:13 PDT
Created attachment 30149 [details]
Patch, changelog

I ran the PLTs with this patch, and was not able to detect any performance decrease.
Comment 3 Simon Fraser (smfr) 2009-05-08 17:53:42 PDT
http://trac.webkit.org/changeset/43423