bumptech / bumptech/glide

Glide.with(Context) very very slow (takes 1 sec)

Open
#3,876 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

Hello,
I'm using glide 4.9.0

To have a faster initialization in a Class of mine, I use glide to perform asyncronous load of an image.

The code is:
FutureTarget mBitmapTarget = null;
mBitmapTarget =
GlideApp.with( context )
.asBitmap()
.apply( new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.NONE) )
.load(R.drawable.my_png_image)
.submit();

The load works correctly... but I noticed a very slow Glide initialization time (such that a direct load would be better).

Here are the image of a java sampling profiling.
![image](https://user-images.githubusercontent.com/31247157/64622986-7f1d2280-d3e8-11e9-97c0-463c69e80aeb.png)
In this profiling session, GlideApp.with takes about 1sec, and the entire command about 1.15sec

In the profiling session, probably the App run slower than usually (it was debug and sampled), and real number may be smaller, but anyway it's a great and significative part of the entire App initialization.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.