mirror of
https://github.com/Qortal/qortal.git
synced 2025-03-13 11:12:31 +00:00
Increased buffer when serving assets from 1kiB to 10kiB
This speeds up image loading. Ultimately we will stop serving these via the application memory altogether.
This commit is contained in:
parent
dc83e32173
commit
fe387931a4
@ -436,7 +436,7 @@ public class WebsiteResource {
|
||||
FileInputStream inputStream = new FileInputStream(file);
|
||||
response.setContentType(context.getMimeType(filename));
|
||||
int bytesRead, length = 0;
|
||||
byte[] buffer = new byte[1024];
|
||||
byte[] buffer = new byte[10240];
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
response.getOutputStream().write(buffer, 0, bytesRead);
|
||||
length += bytesRead;
|
||||
|
Loading…
x
Reference in New Issue
Block a user