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

Increase DEFAULT_CHUNK_SIZE to reduce transfer overhead #87

Merged
merged 1 commit into from Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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