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

Issue 2072613002: Make ResourceLoadPriority calculation simpler (Closed)

Created:
4 years, 6 months ago by Nate Chapin
Modified:
4 years, 4 months ago
Reviewers:
Yoav Weiss, Pat Meenan
CC:
chromium-reviews, tyoshino+watch_chromium.org, gavinp+prerender_chromium.org, blink-reviews-style_chromium.org, blink-reviews-html_chromium.org, loading-reviews_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ResourceLoadPriority calculation simpler * Don't keep a separate ResourceLoadPriority value on FetchRequest, just use ResourceRequest::m_priority. * Make a bit more use of FetchRequest::LazyLoad for cases like preloads where the priority of a request should be very low. * ResourceFetcher::loadPriority() shouldn't blindly trust the priority given by a caller, and instead takes the max of the provided priority and the priority it calculates. * Add a helper to FetchRequest to make a request synchronous, so callers don't need to manually flag the request as Highest priority. This may or may not fix a case where synchronous requests are incorrectly and flakily being given a priority lower than Highest. BUG=620334 Committed: https://crrev.com/fd0671f01914a4f5e74620e75f673f213d302823 Cr-Commit-Position: refs/heads/master@{#410216}

Patch Set 1 #

Patch Set 2 : Drop a default arg #

Total comments: 8

Patch Set 3 : Address kinuko's comments #

Patch Set 4 : +comment re: max() #

Patch Set 5 : Make the comment look more like English #

Total comments: 13

Patch Set 6 : Address review comments #

Total comments: 2

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -39 lines) Patch
M third_party/WebKit/Source/core/fetch/FetchRequest.h View 1 2 3 4 5 6 4 chunks +3 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchRequest.cpp View 4 chunks +9 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResource.cpp View 1 2 3 4 5 6 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 5 chunks +13 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp View 1 2 3 4 5 6 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/LinkResource.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoader.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 39 (17 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2072613002/20001
4 years, 6 months ago (2016-06-15 23:32:40 UTC) #2
Nate Chapin
yoav: I'm removing a couple of your TODOs, so I figured you'd be a good ...
4 years, 6 months ago (2016-06-15 23:44:43 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/239935)
4 years, 6 months ago (2016-06-16 04:34:58 UTC) #8
kinuko
Some drive-by comments/questions (looking good!) https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/FetchRequest.h File third_party/WebKit/Source/core/fetch/FetchRequest.h (right): https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/FetchRequest.h#newcode60 third_party/WebKit/Source/core/fetch/FetchRequest.h:60: explicit FetchRequest(const ResourceRequest&, const ...
4 years, 6 months ago (2016-06-17 05:40:48 UTC) #9
Nate Chapin
https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/FetchRequest.h File third_party/WebKit/Source/core/fetch/FetchRequest.h (right): https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/FetchRequest.h#newcode60 third_party/WebKit/Source/core/fetch/FetchRequest.h:60: explicit FetchRequest(const ResourceRequest&, const AtomicString& initiator, const String& charset ...
4 years, 6 months ago (2016-06-17 18:38:17 UTC) #10
kinuko
Thanks, this l-g-t-m =) https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode164 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:164: return std::max(context().modifyPriorityForExperiments(priority), request.resourceRequest().priority()); On 2016/06/17 ...
4 years, 6 months ago (2016-06-20 04:28:31 UTC) #11
Nate Chapin
https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2072613002/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode164 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:164: return std::max(context().modifyPriorityForExperiments(priority), request.resourceRequest().priority()); On 2016/06/20 04:28:31, kinuko wrote: > ...
4 years, 6 months ago (2016-06-20 19:44:32 UTC) #12
Nate Chapin
yoav: friendly ping :)
4 years, 6 months ago (2016-06-24 17:56:10 UTC) #13
Yoav Weiss
Apologies for the delayed response. On the roads... Refactoring looks good. Several questions regarding the ...
4 years, 6 months ago (2016-06-25 08:37:59 UTC) #15
Pat Meenan
https://codereview.chromium.org/2072613002/diff/80001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2072613002/diff/80001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode162 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:162: priority = ResourceLoadPriorityVeryLow; On 2016/06/25 08:37:59, Yoav Weiss wrote: ...
4 years, 5 months ago (2016-06-27 14:56:55 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2072613002/100001
4 years, 5 months ago (2016-06-27 19:08:20 UTC) #18
Nate Chapin
https://codereview.chromium.org/2072613002/diff/80001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2072613002/diff/80001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode162 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:162: priority = ResourceLoadPriorityVeryLow; On 2016/06/27 14:56:55, Pat Meenan wrote: ...
4 years, 5 months ago (2016-06-27 19:46:16 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 20:54:47 UTC) #21
Yoav Weiss
https://codereview.chromium.org/2072613002/diff/100001/third_party/WebKit/Source/core/loader/LinkLoader.cpp File third_party/WebKit/Source/core/loader/LinkLoader.cpp (right): https://codereview.chromium.org/2072613002/diff/100001/third_party/WebKit/Source/core/loader/LinkLoader.cpp#newcode301 third_party/WebKit/Source/core/loader/LinkLoader.cpp:301: linkRequest.setDefer(FetchRequest::LazyLoad); I think you left that one out, as ...
4 years, 5 months ago (2016-06-30 09:09:14 UTC) #22
Nate Chapin
Sorry for the delay, catching up post-vacation... https://codereview.chromium.org/2072613002/diff/100001/third_party/WebKit/Source/core/loader/LinkLoader.cpp File third_party/WebKit/Source/core/loader/LinkLoader.cpp (right): https://codereview.chromium.org/2072613002/diff/100001/third_party/WebKit/Source/core/loader/LinkLoader.cpp#newcode301 third_party/WebKit/Source/core/loader/LinkLoader.cpp:301: linkRequest.setDefer(FetchRequest::LazyLoad); On ...
4 years, 5 months ago (2016-07-20 19:05:03 UTC) #23
Nate Chapin
On 2016/07/20 19:05:03, Nate Chapin wrote: > Sorry for the delay, catching up post-vacation... > ...
4 years, 4 months ago (2016-07-26 19:29:25 UTC) #28
Yoav Weiss
On 2016/07/26 19:29:25, Nate Chapin wrote: > On 2016/07/20 19:05:03, Nate Chapin wrote: > > ...
4 years, 4 months ago (2016-08-05 12:33:46 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2072613002/120001
4 years, 4 months ago (2016-08-05 16:46:26 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/117103)
4 years, 4 months ago (2016-08-05 18:10:37 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2072613002/120001
4 years, 4 months ago (2016-08-05 22:32:22 UTC) #35
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 4 months ago (2016-08-05 23:47:18 UTC) #37
commit-bot: I haz the power
4 years, 4 months ago (2016-08-05 23:49:07 UTC) #39
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/fd0671f01914a4f5e74620e75f673f213d302823
Cr-Commit-Position: refs/heads/master@{#410216}

Powered by Google App Engine
This is Rietveld 408576698