Skip to content
Permalink
Browse files
feat: increase DEFAULT_CHUNK_SIZE to reduce transfer overhead (#87)
  • Loading branch information
domZippilli authored and elharo committed Dec 13, 2019
1 parent 9b4df8f commit 09b327daf764403b7800180cab79ae3e38815075
@@ -36,8 +36,8 @@
ServiceOptionsT extends ServiceOptions<?, ServiceOptionsT>, EntityT extends Serializable>
implements WriteChannel {

private static final int MIN_CHUNK_SIZE = 256 * 1024;
private static final int DEFAULT_CHUNK_SIZE = 8 * MIN_CHUNK_SIZE;
private static final int MIN_CHUNK_SIZE = 256 * 1024; // 256 KiB
private static final int DEFAULT_CHUNK_SIZE = 60 * MIN_CHUNK_SIZE; // 15MiB

private final ServiceOptionsT options;
private final EntityT entity;
@@ -55,8 +55,8 @@ protected CustomServiceOptions(
private static final Serializable ENTITY = 42L;
private static final String UPLOAD_ID = "uploadId";
private static final byte[] CONTENT = {0xD, 0xE, 0xA, 0xD};
private static final int MIN_CHUNK_SIZE = 256 * 1024;
private static final int DEFAULT_CHUNK_SIZE = 8 * MIN_CHUNK_SIZE;
private static final int MIN_CHUNK_SIZE = 256 * 1024; // 256 KiB
private static final int DEFAULT_CHUNK_SIZE = 60 * MIN_CHUNK_SIZE; // 15MiB
private static final Random RANDOM = new Random();
private static BaseWriteChannel channel;

0 comments on commit 09b327d

Please sign in to comment.