[Webkit-unassigned] [Bug 251701] New: Style::RuleFeatureSet wastes vector capacity
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 3 10:32:30 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=251701
Bug ID: 251701
Summary: Style::RuleFeatureSet wastes vector capacity
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: simon.fraser at apple.com
Using the patch in bug 186698, and testing on a wikipedia page, we see that RuleFeatureSet::collectFeatures() wastes a 5KB vector capacity:
Wasted capacity: 5472 bytes (used 672 of 6144 bytes, utilization: 10.94%) - 24 allocations
1 0x2fcec0bec WebCore::Style::RuleFeatureSet::collectFeatures(WebCore::Style::RuleData const&)
2 0x2fcec5807 WebCore::Style::RuleSet::addRule(WebCore::Style::RuleData&&, unsigned int, unsigned int)
3 0x2fcec5790 WebCore::Style::RuleSet::addRule(WebCore::StyleRule const&, unsigned int, unsigned int)
4 0x2fcee8922 WTF::Vector<WebCore::Style::InvalidationRuleSet, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>* WebCore::Style::ensureInvalidationRuleSets<WTF::AtomString, WTF::Vector<WebCore::Style::RuleFeature, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>, WTF::DefaultHash<WTF::AtomString>, WTF::HashTraits<WTF::AtomString> >(WTF::AtomString const&, WTF::HashMap<WTF::AtomString, std::__1::unique_ptr<WTF::Vector<WebCore::Style::InvalidationRuleSet, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>, std::__1::default_delete<WTF::Vector<WebCore::Style::InvalidationRuleSet, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> > >, WTF::DefaultHash<WTF::AtomString>, WTF::HashTraits<WTF::AtomString>, WTF::HashTraits<std::__1::unique_ptr<WTF::Vector<WebCore::Style::InvalidationRuleSet, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>, std::__1::default_delete<WTF::Vector<WebCore::Style::InvalidationRuleSet, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> > > >, WTF::HashTableTraits>&, WTF::HashMap<WTF::AtomString, std::__1::unique_ptr<WTF::Vector<WebCore::Style::RuleFeature, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>, std::__1::default_delete<WTF::Vector<WebCore::Style::RuleFeature, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> > >, WTF::DefaultHash<WTF::AtomString>, WTF::HashTraits<WTF::AtomString>, WTF::HashTraits<std::__1::unique_ptr<WTF::Vector<WebCore::Style::RuleFeature, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>, std::__1::default_delete<WTF::Vector<WebCore::Style::RuleFeature, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> > > >, WTF::HashTableTraits> const&)
5 0x2fceaeb0d WebCore::Style::ClassChangeInvalidation::computeInvalidation(WebCore::SpaceSplitString const&, WebCore::SpaceSplitString const&)
6 0x2fc3955e1 WebCore::Style::ClassChangeInvalidation::ClassChangeInvalidation(WebCore::Element&, WebCore::SpaceSplitString const&, WebCore::SpaceSplitString const&)
7 0x2fc386170 WebCore::Element::classAttributeChanged(WTF::AtomString const&)
8 0x2fc385b17 WebCore::Element::attributeChanged(WebCore::QualifiedName const&, WTF::AtomString const&, WTF::AtomString const&, WebCore::Element::AttributeModificationReason)
9 0x2fc38fe34 WebCore::Element::didModifyAttribute(WebCore::QualifiedName const&, WTF::AtomString const&, WTF::AtomString const&)
10 0x2fc384df3 WebCore::Element::setAttributeInternal(unsigned int, WebCore::QualifiedName const&, WTF::AtomString const&, WebCore::Element::SynchronizationOfLazyAttribute)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230203/737adf21/attachment-0001.htm>
More information about the webkit-unassigned
mailing list