Wasted vector capacity under RuleFeatureSet::collectFeatures()
Created attachment 425330 [details] Patch
Comment on attachment 425330 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425330&action=review r=me > Source/WebCore/style/StyleScopeRuleSets.cpp:253 > + if (matchElementArray[i]) { NIT: you could save this as `auto* matchElementItem = matchElementArray[i]` to avoid repeated access > Source/WebCore/style/StyleScopeRuleSets.cpp:255 > + invalidationRuleSets->uncheckedAppend({ static_cast<MatchElement>(i), *matchElementArray[i], WTFMove(invalidationSelectorArray[i]) }); NIT: Could this be `matchElementItem.releaseNonNull()` since it's created above?
Comment on attachment 425330 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425330&action=review > Source/WebCore/style/StyleScopeRuleSets.cpp:245 > + unsigned ruleSetCount = 0; > for (unsigned i = 0; i < matchElementArray.size(); ++i) { > if (matchElementArray[i]) This loop could now use range-for.
https://trac.webkit.org/changeset/275637/webkit
<rdar://problem/76369495>