Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
feat: increase DEFAULT_CHUNK_SIZE to reduce transfer overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Zippilli committed Dec 5, 2019
1 parent d8af07a commit 6f0abcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -36,8 +36,8 @@ public abstract class BaseWriteChannel<
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;
Expand Down
Expand Up @@ -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;

Expand Down

0 comments on commit 6f0abcd

Please sign in to comment.