Bug 86560 - StylePropertySet::StylePropertySet() wastes vector capacity
Summary: StylePropertySet::StylePropertySet() wastes vector capacity
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 86281
  Show dependency treegraph
 
Reported: 2012-05-15 20:17 PDT by Simon Fraser (smfr)
Modified: 2012-10-04 06:15 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-05-15 20:17:38 PDT
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*)
Comment 1 Simon Fraser (smfr) 2012-05-15 20:18:08 PDT
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&)
Comment 2 Andreas Kling 2012-10-04 06:15:23 PDT
This was fixed by making StylePropertySet a variable-sized object in <http://trac.webkit.org/changeset/118809>