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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 109153003: Raise the loading priority of in-viewport images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes from review. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/fetch/ResourceLoadPriorityOptimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index b5b5af145eab773534284cb971f1e5c2596b8fe1..ef169c27be6c659479a77835daac8dba9318161c 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -121,7 +121,9 @@ static ResourceLoadPriority loadPriority(Resource::Type type, const FetchRequest
case Resource::ImportResource:
return ResourceLoadPriorityMedium;
case Resource::Image:
- return request.forPreload() ? ResourceLoadPriorityVeryLow : ResourceLoadPriorityLow;
+ // We'll default images to VeryLow, and promote whatever is visible. This improves
+ // speed-index by ~5% on average, ~14% at the 99th percentile.
+ return ResourceLoadPriorityVeryLow;
case Resource::XSLStyleSheet:
ASSERT(RuntimeEnabledFeatures::xsltEnabled());
return ResourceLoadPriorityHigh;
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/fetch/ResourceLoadPriorityOptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698