Title: [201697] trunk/Source/WebCore
Revision
201697
Author
[email protected]
Date
2016-06-05 08:20:06 -0700 (Sun, 05 Jun 2016)

Log Message

Give RuleFeatures::classesMatchingAncestors some inline capacity.
<https://webkit.org/b/158356>

Reviewed by Darin Adler.

Avoid 362'000 heap allocations on PLUM (1.3% of all transient fastMallocs) by giving
RuleFeatures::classesMatchingAncestors some inline capacity (32).
This class is only ever allocated on the stack anyway.

* css/RuleFeature.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (201696 => 201697)


--- trunk/Source/WebCore/ChangeLog	2016-06-05 14:54:36 UTC (rev 201696)
+++ trunk/Source/WebCore/ChangeLog	2016-06-05 15:20:06 UTC (rev 201697)
@@ -1,3 +1,16 @@
+2016-06-05  Andreas Kling  <[email protected]>
+
+        Give RuleFeatures::classesMatchingAncestors some inline capacity.
+        <https://webkit.org/b/158356>
+
+        Reviewed by Darin Adler.
+
+        Avoid 362'000 heap allocations on PLUM (1.3% of all transient fastMallocs) by giving
+        RuleFeatures::classesMatchingAncestors some inline capacity (32).
+        This class is only ever allocated on the stack anyway.
+
+        * css/RuleFeature.h:
+
 2016-06-05  Brady Eidson  <[email protected]>
 
         Unreviewed, rolling out r201693.

Modified: trunk/Source/WebCore/css/RuleFeature.h (201696 => 201697)


--- trunk/Source/WebCore/css/RuleFeature.h	2016-06-05 14:54:36 UTC (rev 201696)
+++ trunk/Source/WebCore/css/RuleFeature.h	2016-06-05 15:20:06 UTC (rev 201697)
@@ -74,7 +74,7 @@
 private:
     struct SelectorFeatures {
         bool hasSiblingSelector { false };
-        Vector<AtomicStringImpl*> classesMatchingAncestors;
+        Vector<AtomicStringImpl*, 32> classesMatchingAncestors;
         Vector<const CSSSelector*> attributeSelectorsMatchingAncestors;
     };
     void recursivelyCollectFeaturesFromSelector(SelectorFeatures&, const CSSSelector&, bool matchesAncestor = false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to