We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIL appears to use an IO Buffer size of 8k, data seems to indicate 32k would be better performance: http://stackoverflow.com/questions/10143731/android-optimal-buffer-size
Would prefer to have an option to set in ImageLoaderConfiguration.
The text was updated successfully, but these errors were encountered:
Noted.
Sorry, something went wrong.
Issue #249 : Buffer size 8K -> 32K
3bfc46d
You can use your own value of buffer size by extending BaseImageDownloader:
BaseImageDownloader
public class MyImageDownloader extends BaseImageDownloader { private static final int MY_BUFFER_SIZE = 128 * 1024; // this is your value public MyImageDownloader(Context context) { super(context); } public MyImageDownloader(Context context, int connectTimeout, int readTimeout) { super(context, connectTimeout, readTimeout); } protected InputStream getStreamFromNetwork(String imageUri, Object extra) throws IOException { HttpURLConnection conn = createConnection(imageUri); int redirectCount = 0; while (conn.getResponseCode() / 100 == 3 && redirectCount < MAX_REDIRECT_COUNT) { conn = createConnection(conn.getHeaderField("Location")); redirectCount++; } return new BufferedInputStream(conn.getInputStream(), MY_BUFFER_SIZE); } protected InputStream getStreamFromFile(String imageUri, Object extra) throws IOException { String filePath = Scheme.FILE.crop(imageUri); return new BufferedInputStream(new FileInputStream(filePath), MY_BUFFER_SIZE); } }
No branches or pull requests
UIL appears to use an IO Buffer size of 8k, data seems to indicate 32k would be better performance: http://stackoverflow.com/questions/10143731/android-optimal-buffer-size
Would prefer to have an option to set in ImageLoaderConfiguration.
The text was updated successfully, but these errors were encountered: