|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by hiroshige Modified:
4 years, 1 month ago CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-style_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionReport the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size
Previously, |m_decodedSheetText| was reported as encoded data, while it is
not |m_data|.
This CL reports |m_decodedSheetText| as decoded data and call
setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being
reported both as encoded and decoded data to memory-infra.
This CL also makes setParsedStyleSheetCache() to always update the decoded
size, while the decoded size was not updated in some call sites of
setParsedStyleSheetCache().
BUG=643135
Committed: https://crrev.com/71b354672add64227227bc3dec0e5462f1e0dda4
Cr-Commit-Position: refs/heads/master@{#430521}
Patch Set 1 #Patch Set 2 : move to setParsedStyleSheetCache #
Total comments: 5
Patch Set 3 : comment #
Total comments: 2
Patch Set 4 : setDecodedSheetText() #
Depends on Patchset: Messages
Total messages: 32 (21 generated)
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: 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
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Report CSSStyleSheetResource::m_decodedSheetText size as decoded size BUG= ========== to ========== Report the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size Previously, |m_decodedSheetText| was reported as encoded data, while it is not |m_data|. This CL reports |m_decodedSheetText| as decoded data and call setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being reported both as encoded and decoded data to memory-infra. This CL also makes setParsedStyleSheetCache() to always update the decoded size, while the decoded size was not updated in some call sites of setParsedStyleSheetCache(). BUG=643135 ==========
hiroshige@chromium.org changed reviewers: + hajimehoshi@chromium.org, kouhei@chromium.org, yhirano@chromium.org
PTAL, yhirano@ as core/fetch OWNER, hajimehoshi@ from memory-reporting-related viewpoints, kouhei@ as this is related to clearing |m_data| and having the decoded data in m_decodedSheetText after load finished. setEncodedSizeMemoryUsage() call will be moved into clearData() in a follow-up CL.
https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:79: m_parsedStyleSheetCache->setReferencedFromResource(this); Can we add a comment here: // update decoded size to take parsed stylesheet cache into account. https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:168: updateDecodedSize(); Can we skip it here? destroyDecodedDataIfPossible will zero-out decoded size anyway
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:79: m_parsedStyleSheetCache->setReferencedFromResource(this); On 2016/11/07 09:29:39, kouhei wrote: > Can we add a comment here: > // update decoded size to take parsed stylesheet cache into account. Done. https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:168: updateDecodedSize(); On 2016/11/07 09:29:39, kouhei wrote: > Can we skip it here? destroyDecodedDataIfPossible will zero-out decoded size > anyway I thought destroyDecodedDataIfPossible() doesn't call setParsedStyleSheetCache (and setDecodedSize()) if m_parsedStyleSheetCache is nullptr, so I placed this call here. (I'm not sure whether this can happen though)
The CQ bit was unchecked by hiroshige@chromium.org
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2477293002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:168: updateDecodedSize(); On 2016/11/07 09:36:07, hiroshige wrote: > On 2016/11/07 09:29:39, kouhei wrote: > > Can we skip it here? destroyDecodedDataIfPossible will zero-out decoded size > > anyway > > I thought destroyDecodedDataIfPossible() doesn't call setParsedStyleSheetCache > (and setDecodedSize()) if m_parsedStyleSheetCache is nullptr, so I placed this > call here. > (I'm not sure whether this can happen though) Makes sense. lgtm
https://codereview.chromium.org/2477293002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2477293002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:142: updateDecodedSize(); I'd make setDecodedSheetText and call updateDecodedSize there
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2477293002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2477293002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:142: updateDecodedSize(); On 2016/11/07 11:11:34, hajimehoshi wrote: > I'd make setDecodedSheetText and call updateDecodedSize there Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
lgtm
The CQ bit was checked by hiroshige@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from kouhei@chromium.org Link to the patchset: https://codereview.chromium.org/2477293002/#ps60001 (title: "setDecodedSheetText()")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Report the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size Previously, |m_decodedSheetText| was reported as encoded data, while it is not |m_data|. This CL reports |m_decodedSheetText| as decoded data and call setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being reported both as encoded and decoded data to memory-infra. This CL also makes setParsedStyleSheetCache() to always update the decoded size, while the decoded size was not updated in some call sites of setParsedStyleSheetCache(). BUG=643135 ========== to ========== Report the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size Previously, |m_decodedSheetText| was reported as encoded data, while it is not |m_data|. This CL reports |m_decodedSheetText| as decoded data and call setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being reported both as encoded and decoded data to memory-infra. This CL also makes setParsedStyleSheetCache() to always update the decoded size, while the decoded size was not updated in some call sites of setParsedStyleSheetCache(). BUG=643135 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Report the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size Previously, |m_decodedSheetText| was reported as encoded data, while it is not |m_data|. This CL reports |m_decodedSheetText| as decoded data and call setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being reported both as encoded and decoded data to memory-infra. This CL also makes setParsedStyleSheetCache() to always update the decoded size, while the decoded size was not updated in some call sites of setParsedStyleSheetCache(). BUG=643135 ========== to ========== Report the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size Previously, |m_decodedSheetText| was reported as encoded data, while it is not |m_data|. This CL reports |m_decodedSheetText| as decoded data and call setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being reported both as encoded and decoded data to memory-infra. This CL also makes setParsedStyleSheetCache() to always update the decoded size, while the decoded size was not updated in some call sites of setParsedStyleSheetCache(). BUG=643135 Committed: https://crrev.com/71b354672add64227227bc3dec0e5462f1e0dda4 Cr-Commit-Position: refs/heads/master@{#430521} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/71b354672add64227227bc3dec0e5462f1e0dda4 Cr-Commit-Position: refs/heads/master@{#430521} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
