|
|
Chromium Code Reviews
DescriptionReport TeeHelper::Chunk buffer size to V8
Reporting the buffer size of TeeHelper::Chunk to V8 should trigger V8 GC earlier and will hopefully slightly reduce memory usage.
BUG=715928
Review-Url: https://codereview.chromium.org/2847543003
Cr-Commit-Position: refs/heads/master@{#469963}
Committed: https://chromium.googlesource.com/chromium/src/+/0cd83681ad239907cf6fc7c07cfcca1262474529
Patch Set 1 #
Total comments: 3
Patch Set 2 : fix #Messages
Total messages: 18 (9 generated)
Description was changed from ========== Report BytesConsumer::Chunk buffer size to V8 Reporting the buffer size of BytesConsumer::Chunk to V8 should trigger V8 GC earlier and will hopefully lower memory usage. BUG=715928 ========== to ========== Report BytesConsumer::Chunk buffer size to V8 Reporting the buffer size of BytesConsumer::Chunk to V8 should trigger V8 GC earlier and will hopefully slightly reduce memory usage. BUG=715928 ==========
keishi@chromium.org changed reviewers: + haraken@chromium.org, horo@chromium.org
I still haven't been able to make a telemetry benchmark that reliably distills the results into a single memory usage value. But trace taken while telemetry script reloads Flipkart 20 times, clearly shows ~2MB reduction in peak Chunk buffer size https://drive.google.com/open?id=0BwRi59l_ri74VDVhZTczNU8xX3M Trace files for 4 runs each: https://drive.google.com/open?id=0BwRi59l_ri74YjIzblFRTWJ2TTg
LGTM Maybe we should think about reporting the total size of buffer partition to V8, but that should be a separate discussion. https://codereview.chromium.org/2847543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp (right): https://codereview.chromium.org/2847543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp:118: v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory( Would it be possible to pass in Isolate* to Chunk's constructor? We're deprecating Isolate::GetCurrent().
This cl only changes TeeHelper::Chunk. Not BytesConsumer::Chunk. This Chunk is used only when response.clone() is called. But I think clone() is not heavily used in the real world. Do you know any sites which calls clone() heavily? https://codereview.chromium.org/2847543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp (right): https://codereview.chromium.org/2847543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp:118: v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory( Please write comment about why we need to call it.
Description was changed from ========== Report BytesConsumer::Chunk buffer size to V8 Reporting the buffer size of BytesConsumer::Chunk to V8 should trigger V8 GC earlier and will hopefully slightly reduce memory usage. BUG=715928 ========== to ========== Report TeeHelper::Chunk buffer size to V8 Reporting the buffer size of TeeHelper::Chunk to V8 should trigger V8 GC earlier and will hopefully slightly reduce memory usage. BUG=715928 ==========
> This Chunk is used only when response.clone() is called. > But I think clone() is not heavily used in the real world. > Do you know any sites which calls clone() heavily? So it looks like Flipkart is using Response.clone() when caching most resources(js/css/image) from the FetchEvent listener. Another site I found to create many Chunks is, Aliexpress. https://codereview.chromium.org/2847543003/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp (right): https://codereview.chromium.org/2847543003/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp:118: v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory( On 2017/04/27 09:39:32, horo wrote: > Please write comment about why we need to call it. Done.
lgtm
The CQ bit was checked by keishi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/2847543003/#ps20001 (title: "fix")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by keishi@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1494239601852070,
"parent_rev": "e47869070678bd31d3b599ba1bb752784fd2be84", "commit_rev":
"0cd83681ad239907cf6fc7c07cfcca1262474529"}
Message was sent while issue was closed.
Description was changed from ========== Report TeeHelper::Chunk buffer size to V8 Reporting the buffer size of TeeHelper::Chunk to V8 should trigger V8 GC earlier and will hopefully slightly reduce memory usage. BUG=715928 ========== to ========== Report TeeHelper::Chunk buffer size to V8 Reporting the buffer size of TeeHelper::Chunk to V8 should trigger V8 GC earlier and will hopefully slightly reduce memory usage. BUG=715928 Review-Url: https://codereview.chromium.org/2847543003 Cr-Commit-Position: refs/heads/master@{#469963} Committed: https://chromium.googlesource.com/chromium/src/+/0cd83681ad239907cf6fc7c07cfc... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/0cd83681ad239907cf6fc7c07cfc... |
