Loading image with glide is slow
I used dontTransform()
method and it almost saved me a second. Images are loaded to the list really first.
Just add this when you get image from URL
, this code reduces the size of that image
you can also do this,
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
//save scaled down image to cache dir
newBitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
File imageFile = new File(filePath);
// write the bytes in file
FileOutputStream fo = new FileOutputStream(imageFile);
fo.write(bytes.toByteArray());
check this example