title: Slow loading ImageView in ListView - Android
body: <p>I have read some posts about loading image in Android but this argument is a bit confusing for me yet.
  I have a ListView and I would load inside it some images from firebase storage. I have also other images from <a href="https://books.google" rel="nofollow">https://books.google</a>, these images are loaded immediately. </p>
  
  <p>When I load images from firebase storage the device is very slow. I have tried using <em>Picasso</em> library and also with this code:</p>
  
  <pre><code> public class loadImage extends AsyncTask&lt;String, String, Bitmap&gt; {
  
      HttpURLConnection connection;
      BufferedReader reader;
  
      @Override
      protected Bitmap doInBackground(String... params) {
          try {
              URL url = new URL(params[0]);
              connection = (HttpURLConnection) url.openConnection();
              connection.connect();
  
              InputStream inputStream = connection.getInputStream();
              reader = new BufferedReader(new InputStreamReader(inputStream));
              StringBuilder stringBuffer = new StringBuilder();
  
              String line = "";
              while ((line = reader.readLine()) != null) {
                  stringBuffer.append(line);
              }
  
  
              return BitmapFactory.decodeStream((InputStream) url.getContent());
  
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
              if (connection != null) {
                  connection.disconnect();
              }
              try {
                  if(reader != null) {
                      reader.close();
                  }
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return null;
      }
  
      @Override
      protected void onPostExecute(Bitmap result) {
          super.onPostExecute(result);
          bookImage.setImageBitmap(result);
      }
  }
  </code></pre>
  
  <p>Maybe Volley is better than Picasso? Or Fresco or Glide?
  Anyone can help me?</p>