Changeset 150912 in webkit
- Timestamp:
- May 29, 2013 11:37:10 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150910 r150912 1 2013-05-29 Ryosuke Niwa <rniwa@webkit.org> 2 3 Remove the size of DataVector in HTMLToken 4 https://bugs.webkit.org/show_bug.cgi?id=116931 5 6 Reviewed by Sam Weinig. 7 8 Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9. 9 10 Shink HTMLToken by 1.5 kB 11 12 HTMLToken has an inline vector for buffering characters during tokenization. We 13 originally picked the inline capacity of this buffer somewhat arbitrarily. This 14 CL tunes the number based on a somewhat non-scientific browse of a number of 15 popular web sites. 16 17 I (abarth) instrumented content_shell to log the length of each complete DataVector. I 18 then browsed around a variety of web sites to collect data. The 99% percentile 19 of DataVector lengths was just shy of 250 characters. I rounded that up to 256 20 because powers of two are pretty. That means we'll malloc an external buffer 21 less than 1% of the time, which seems fine. 22 23 * html/parser/HTMLToken.h: 24 (HTMLToken): 25 1 26 2013-05-29 Brent Fulgham <bfulgham@apple.com> 2 27 -
trunk/Source/WebCore/html/parser/HTMLToken.h
r148921 r150912 91 91 }; 92 92 93 typedef WTF::Vector<Attribute, 10> AttributeList;94 typedef WTF::Vector<UChar, 1024> DataVector;93 typedef Vector<Attribute, 10> AttributeList; 94 typedef Vector<UChar, 256> DataVector; 95 95 96 96 HTMLToken() { clear(); }
Note: See TracChangeset
for help on using the changeset viewer.