Issue 1:
I'm using glide 3.7.0 and can see following:

When I fast scroll in lists which display images and animated gifs, displaying a gif blocks all further image loading for a short time (visual impression is that a gif must finish loading before further images are loaded)

What I tried so far:

A simple change to the gif loading solves the problem (adding asBitmap and disable the gif animation therefore) - this is not what I want though

giving all the gif request Priority.LOW and all others Priority.NORMAL - this does not change anything, although it seems to be what I actually want... It's just not working though...

Is there something different I can do?

Additional info

I'm using following disc cache strategy (decided to use this, because of some other issues here and this was the suggested solution):

protected static DiskCacheStrategy getStrategy(IMedia media)
{
if (media instanceof ILocalMedia) // if media is a local media
{
if (media.getMediaType() == MediaType.Gif)
return DiskCacheStrategy.NONE;
return DiskCacheStrategy.RESULT;
}
else // media is some network media, we must download it, so we need to use some caching
{
return DiskCacheStrategy.RESULT;
}
}

Issue 2:
Hello,

I have a screen with a grid of the gifs. I open this screen using 2G connection. About 16 gifs are started downloading with LOW priority. I click on the random (not yet downloaded) item and the screen with preview is opened. The gif is loading with IMMEDIATE priority.

However it gives me TimeoutError.

I think that it's because I lot of another gifs are downloading at the same moment.

While searching a solution I added an integration with Volley

compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:volley-integration:1.3.1@aar'

custom module

@Override
public void registerComponents(Context context, Glide glide) {
File cacheDir = new File(context.getCacheDir(), DEFAULT_CACHE_DIR);
Network network = new CustomBasicNetwork(new HurlStack());
RequestQueue queue = new RequestQueue(new DiskBasedCache(cacheDir), network){

@Override
public <T> Request<T> add(Request<T> request) {
request.setRetryPolicy(new DefaultRetryPolicy(TIMEOUT_MS, 1, 1));
return super.add(request);
}
};
queue.start();
glide.register(GlideUrl.class, InputStream.class, new VolleyUrlLoader.Factory(queue));
}

I tried to set TIMEOUT_MS to 30000 and even 100000 but it doesn't work. In any case I get the next error

11-23 12:49:52.343 4803-4803/com.talk W/System.err: java.util.concurrent.ExecutionException: com.android.volley.TimeoutError
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.integration.volley.VolleyRequestFuture.doGet(VolleyRequestFuture.java:125)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.integration.volley.VolleyRequestFuture.get(VolleyRequestFuture.java:92)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.integration.volley.VolleyStreamFetcher.loadData(VolleyStreamFetcher.java:68)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.integration.volley.VolleyStreamFetcher.loadData(VolleyStreamFetcher.java:21)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.model.ImageVideoModelLoader$ImageVideoFetcher.loadData(ImageVideoModelLoader.java:70)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.model.ImageVideoModelLoader$ImageVideoFetcher.loadData(ImageVideoModelLoader.java:53)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:170)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at java.lang.Thread.run(Thread.java:818)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:118)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: Caused by: com.android.volley.TimeoutError
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:140)
11-23 12:49:52.350 4803-4803/com.talk W/System.err: at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)

If I open the grid with gifs, wait until they will be downloaded and open preview of some downloaded gif - everything works ok.

Why priority doesn't work?

Perhaps I misunderstand the concept of priorities. I thought that IMMEDIATE must perform current request in front of the queue.