Title: [257319] releases/WebKitGTK/webkit-2.28/Source/WebCore
- Revision
- 257319
- Author
- carlo...@webkit.org
- Date
- 2020-02-25 08:00:29 -0800 (Tue, 25 Feb 2020)
Log Message
Merge r256223 - [WebCore] Shrink Vectors passed to SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=207503
Reviewed by Yusuke Suzuki.
Once SharedBuffer::DataSegment is created, the content won't change in its life cycle. Shrink the passed vector
before assigning to member variable to save space.
With the quick research, when displaying Apple's website, 1~3% RSS usage reduction on PlayStation port.
No new tests because there's no behavior change.
* platform/SharedBuffer.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog (257318 => 257319)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-02-25 16:00:25 UTC (rev 257318)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-02-25 16:00:29 UTC (rev 257319)
@@ -1,3 +1,19 @@
+2020-02-10 Basuke Suzuki <basuke.suz...@sony.com>
+
+ [WebCore] Shrink Vectors passed to SharedBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=207503
+
+ Reviewed by Yusuke Suzuki.
+
+ Once SharedBuffer::DataSegment is created, the content won't change in its life cycle. Shrink the passed vector
+ before assigning to member variable to save space.
+
+ With the quick research, when displaying Apple's website, 1~3% RSS usage reduction on PlayStation port.
+
+ No new tests because there's no behavior change.
+
+ * platform/SharedBuffer.h:
+
2020-02-07 Ryosuke Niwa <rn...@webkit.org>
Don't update selection when calling setSelectionRange on a disconnected input element
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/platform/SharedBuffer.h (257318 => 257319)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/platform/SharedBuffer.h 2020-02-25 16:00:25 UTC (rev 257318)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/platform/SharedBuffer.h 2020-02-25 16:00:29 UTC (rev 257319)
@@ -129,7 +129,12 @@
WEBCORE_EXPORT const char* data() const;
WEBCORE_EXPORT size_t size() const;
- static Ref<DataSegment> create(Vector<char>&& data) { return adoptRef(*new DataSegment(WTFMove(data))); }
+ static Ref<DataSegment> create(Vector<char>&& data)
+ {
+ data.shrinkToFit();
+ return adoptRef(*new DataSegment(WTFMove(data)));
+ }
+
#if USE(CF)
static Ref<DataSegment> create(RetainPtr<CFDataRef>&& data) { return adoptRef(*new DataSegment(WTFMove(data))); }
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes