Ignore:
Timestamp:
Jun 1, 2016, 11:14:25 AM (10 years ago)
Author:
akling@apple.com
Message:

Use inline capacity for StylePropertyShorthand Vectors.
<https://webkit.org/b/158260>

Reviewed by Antti Koivisto.

Vector<StylePropertyShorthand> was a huge source of heap allocations,
just over 0.5% of all fastMalloc() bytes on PLUM. Giving it an inline capacity
of 4 turns all of it into stack allocations.

  • css/CSSParser.cpp:

(WebCore::CSSParser::addProperty):

  • css/CSSProperty.cpp:

(WebCore::StylePropertyMetadata::shorthandID):

  • css/StylePropertyShorthand.cpp:

(WebCore::indexOfShorthandForLonghand):

  • css/StylePropertyShorthand.h:
  • css/makeprop.pl:

(constructShorthandsVector):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSParser.cpp

    r201498 r201559  
    16101610    }
    16111611
    1612     Vector<StylePropertyShorthand> shorthands = matchingShorthandsForLonghand(propId);
     1612    auto shorthands = matchingShorthandsForLonghand(propId);
    16131613    if (shorthands.size() == 1)
    16141614        m_parsedProperties.append(CSSProperty(propId, WTFMove(value), important, true, CSSPropertyInvalid, m_implicitShorthand || implicit));
Note: See TracChangeset for help on using the changeset viewer.