Bug 86560
Summary: | StylePropertySet::StylePropertySet() wastes vector capacity | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | kling, koivisto, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 86281 |
Simon Fraser (smfr)
This shows up high on the wasted vector capacity logging:
7287 vectors, 585.92KB used of 740.78KB, 154.86KB wasted at:
1 0x1096bbc48 WebCore::StylePropertySet::StylePropertySet(WebCore::CSSProperty const*, int, WebCore::CSSParserMode)
2 0x108da1c5f WebCore::CSSParser::createStyleRule(WTF::Vector<WTF::OwnPtr<WebCore::CSSParserSelector>, 0ul>*)
3 0x108d7748a cssyyparse(void*)
4 0x108d83a7f WebCore::CSSParser::parseSheet(WebCore::StyleSheetInternal*, WTF::String const&, int, WTF::HashMap<WebCore::StyleRule*, WTF::RefPtr<WebCore::CSSRuleSourceData>, WTF::PtrHash<WebCore::StyleRule*>, WTF::HashTraits<WebCore::StyleRule*>, WTF::HashTraits<WTF::RefPtr<WebCore::CSSRuleSourceData> > >*)
5 0x108dbbe43 WebCore::StyleSheetInternal::parseAuthorStyleSheet(WebCore::CachedCSSStyleSheet const*, WebCore::SecurityOrigin const*)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
Also being created via:
2531 vectors, 40.50KB used of 158.66KB, 118.16KB wasted at:
1 0x1096bbb80 WebCore::StylePropertySet::StylePropertySet(WebCore::CSSParserMode)
2 0x108f2304b WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation(WebCore::StyledElement*, WTF::String const&)
3 0x1096b6d52 WebCore::StyledElement::parseAttribute(WebCore::Attribute const&)
4 0x109000cdf WebCore::HTMLElement::parseAttribute(WebCore::Attribute const&)
5 0x1096b6b8c WebCore::StyledElement::attributeChanged(WebCore::Attribute const&)
Andreas Kling
This was fixed by making StylePropertySet a variable-sized object in <http://trac.webkit.org/changeset/118809>