Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1032)

Issue 86533002: Raise the loading priority of in-viewport images. (Closed)

Created:
7 years ago by shatch
Modified:
7 years ago
CC:
blink-reviews, bemjb+rendering_chromium.org, eae+blinkwatch, leviw+renderwatch, Julien - ping for review, zoltan1, Chris Evans, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

This CL attempts to improve upon the default loading priorities for images. By default, images will start at ResourceLoadPriorityVeryLow and after a layout or during a scroll, anything that's visible will be promoted up to ResourceLoadPriorityLow. In our tests, this was a really nice win on speed-index, with a gain of ~5% on average, at ~14% at the 99th percentile. BUG=319073 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=163110

Patch Set 1 #

Total comments: 12

Patch Set 2 : Changes from review. #

Patch Set 3 : Add priority check. #

Total comments: 11

Patch Set 4 : Changes from review + replace layout test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -81 lines) Patch
A LayoutTests/http/tests/loading/promote-img-in-viewport-priority.html View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/loading/promote-img-in-viewport-priority-expected.txt View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
D LayoutTests/http/tests/loading/promote-img-preload-priority.html View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
D LayoutTests/http/tests/loading/promote-img-preload-priority-expected.txt View 1 2 3 1 chunk +0 lines, -12 lines 0 comments Download
A + LayoutTests/http/tests/misc/resources/image-slow-out-of-viewport.pl View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
A + Source/core/fetch/ResourceLoadPriorityOptimizer.h View 1 2 3 1 chunk +24 lines, -26 lines 0 comments Download
A + Source/core/fetch/ResourceLoadPriorityOptimizer.cpp View 1 2 3 1 chunk +28 lines, -29 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 chunks +10 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 3 chunks +72 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderImage.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderImage.cpp View 1 2 3 2 chunks +36 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
shatch
7 years ago (2013-11-25 22:14:33 UTC) #1
eseidel
It looks like you're performing this work even for images which have already loaded? That ...
7 years ago (2013-11-25 23:59:30 UTC) #2
shatch
ptal Re: It looks like you're performing this work even for images which have already ...
7 years ago (2013-11-26 01:35:17 UTC) #3
eseidel
On 2013/11/26 01:35:17, shatch wrote: > ptal > > > Re: It looks like you're ...
7 years ago (2013-11-27 20:50:46 UTC) #4
eseidel
lgtm https://codereview.chromium.org/86533002/diff/40001/Source/core/fetch/ResourceLoadPriorityOptimizer.cpp File Source/core/fetch/ResourceLoadPriorityOptimizer.cpp (right): https://codereview.chromium.org/86533002/diff/40001/Source/core/fetch/ResourceLoadPriorityOptimizer.cpp#newcode77 Source/core/fetch/ResourceLoadPriorityOptimizer.cpp:77: if (!img || img->isLoaded()) Yes! Sorry, missed this ...
7 years ago (2013-11-27 20:58:35 UTC) #5
eseidel
Added abarth/cevans in case they care to comment on HashMap usage and its interaction with ...
7 years ago (2013-11-27 21:01:01 UTC) #6
shatch
On 2013/11/27 21:01:01, eseidel wrote: > Added abarth/cevans in case they care to comment on ...
7 years ago (2013-11-27 22:39:38 UTC) #7
abarth-chromium
https://codereview.chromium.org/86533002/diff/40001/Source/core/fetch/ResourceLoadPriorityOptimizer.cpp File Source/core/fetch/ResourceLoadPriorityOptimizer.cpp (right): https://codereview.chromium.org/86533002/diff/40001/Source/core/fetch/ResourceLoadPriorityOptimizer.cpp#newcode75 Source/core/fetch/ResourceLoadPriorityOptimizer.cpp:75: void ResourceLoadPriorityOptimizer::notifyImageResourceVisibility(ImageResource* img, VisibilityStatus status) img -> image (Please ...
7 years ago (2013-12-02 19:34:56 UTC) #8
shatch
New snapshot uploaded, ptal Also realized I broke the promote-img-preload-priority test, but if we're managing ...
7 years ago (2013-12-02 22:32:46 UTC) #9
eseidel
lgtm.
7 years ago (2013-12-03 18:59:30 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonhatch@chromium.org/86533002/80001
7 years ago (2013-12-03 19:05:19 UTC) #11
commit-bot: I haz the power
7 years ago (2013-12-03 20:54:46 UTC) #12
Message was sent while issue was closed.
Change committed as 163110

Powered by Google App Engine
This is Rietveld 408576698