Android loading image from url performance
<p>I have classic AsyncTask to load image:</p>

<pre><code>private class DownloadImageTask extends AsyncTask&lt;String,Void,Bitmap&gt; {

    Bitmap  bitmap = null;

    @Override
    protected Bitmap doInBackground(String... str) {
        try{   

            InputStream in = new java.net.URL(picture).openStream();
            bitmap = BitmapFactory.decodeStream(new SanInputStream(in));
            //viewPicture.setImageBitmap(bitmap);
            viewPicture.setBackgroundDrawable(new BitmapDrawable(bitmap));


        }
        catch(Exception e){
            e.printStackTrace();
        }
        return bitmap;
    }
}
</code></pre>

<p>But loading of image is to long. When I start this activity, everything is loaded besides image and only after waiting a second I can see it. What is the problem?</p>
