fewer image loader threads

This commit is contained in:
dosiecki 2016-11-08 12:40:20 -08:00
parent dbda6f2600
commit f0c422664a
2 changed files with 5 additions and 1 deletions

View file

@ -92,4 +92,8 @@ public class AppConstants {
// link to the web-based forgot password flow
public final static String FORGOT_PASWORD_URL = "http://www.newsblur.com/folder_rss/forgot_password";
// how many helper threads to use for loading icons and thumbnails. things look smoother
// if this is set to 3+, but as of late 2016, too many devices get resource constrained past 2
public final static int IMAGE_LOADER_THREAD_COUNT = 2;
}

View file

@ -37,7 +37,7 @@ public class ImageLoader {
private ImageLoader(FileCache fileCache, int emptyRID, int minImgHeight, boolean hideMissing, long memoryCacheSize) {
this.memoryCache = new MemoryCache(memoryCacheSize);
this.fileCache = fileCache;
executorService = Executors.newFixedThreadPool(3);
executorService = Executors.newFixedThreadPool(AppConstants.IMAGE_LOADER_THREAD_COUNT);
this.emptyRID = emptyRID;
this.minImgHeight = minImgHeight;
this.hideMissing = hideMissing;