Title: [152905] trunk/Source/WebCore
- Revision
- 152905
- Author
- [email protected]
- Date
- 2013-07-19 10:43:07 -0700 (Fri, 19 Jul 2013)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (152904 => 152905)
--- trunk/Source/WebCore/ChangeLog 2013-07-19 17:40:53 UTC (rev 152904)
+++ trunk/Source/WebCore/ChangeLog 2013-07-19 17:43:07 UTC (rev 152905)
@@ -1,3 +1,17 @@
+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-19 Diego Pino Garcia <[email protected]>
[GTK] Merge decamelizations fix ups in the GObject DOM bindings code generator
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (152904 => 152905)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-07-19 17:40:53 UTC (rev 152904)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-07-19 17:43:07 UTC (rev 152905)
@@ -2743,7 +2743,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