Title: [153388] branches/safari-537-branch/Source/WebCore
Revision
153388
Author
[email protected]
Date
2013-07-26 16:41:06 -0700 (Fri, 26 Jul 2013)

Log Message

Merged r152905.  <rdar://problem/14489987>

Modified Paths

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153387 => 153388)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-26 23:19:30 UTC (rev 153387)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-26 23:41:06 UTC (rev 153388)
@@ -1,3 +1,21 @@
+2013-07-26  Lucas Forschler  <[email protected]>
+
+        Merge r152905
+
+    2013-07-19  Geoffrey Garen  <[email protected]>
+
+            TrailingObjects shouldn't shrink vector capacity in a loop
+            https://bugs.webkit.org/show_bug.cgi?id=118322
+
+            Reviewed by Darin Adler.
+
+            This seems to take about 3% off the profile of loading a large text file.
+
+            * rendering/RenderBlockLineLayout.cpp:
+            (WebCore::TrailingObjects::clear): clear() has the built-in side effect
+            of throwing away existing capacity. Use shrink(0) to indicate that we
+            want to keep our existing capacity.
+            
 2013-07-24  Lucas Forschler  <[email protected]>
 
         Merge r153092

Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (153387 => 153388)


--- branches/safari-537-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-07-26 23:19:30 UTC (rev 153387)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-07-26 23:41:06 UTC (rev 153388)
@@ -2735,7 +2735,7 @@
 inline void TrailingObjects::clear()
 {
     m_whitespace = 0;
-    m_boxes.clear();
+    m_boxes.shrink(0); // Use shrink(0) instead of clear() to retain our capacity.
 }
 
 inline void TrailingObjects::appendBoxIfNeeded(RenderBoxModelObject* box)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to