double chunk size
This commit is contained in:
@@ -8,14 +8,14 @@ const PARTIALS_KEY = 'partialStreams';
|
|||||||
const PARTS_DIR = 'parts';
|
const PARTS_DIR = 'parts';
|
||||||
|
|
||||||
// MAX_ATTEMPTS is consecutive attempts that acquired zero chunks, so the exponential
|
// MAX_ATTEMPTS is consecutive attempts that acquired zero chunks, so the exponential
|
||||||
// backoff below tolerates roughly 8 minutes of outage before giving up
|
// backoff below tolerates roughly 16 minutes of outage before giving up
|
||||||
const MAX_ATTEMPTS = 8;
|
const MAX_ATTEMPTS = 8;
|
||||||
|
|
||||||
const CHUNK_SIZE = 4 * 1024 * 1024;
|
const CHUNK_SIZE = 8 * 1024 * 1024;
|
||||||
|
|
||||||
// 60s as the limit for downloading one chunk is a reasonable guess
|
// 120s as the limit for downloading one chunk is a reasonable guess
|
||||||
// as the intent is to catch socket breakage during cellular network changes for example
|
// as the intent is to catch socket breakage during cellular network changes for example
|
||||||
const CHUNK_TIMEOUT = 60_000;
|
const CHUNK_TIMEOUT = 120_000;
|
||||||
|
|
||||||
export const cached = new SvelteSet<string>(readStored<string[]>(STORAGE_KEY, []));
|
export const cached = new SvelteSet<string>(readStored<string[]>(STORAGE_KEY, []));
|
||||||
export const downloading = new SvelteMap<string, number>();
|
export const downloading = new SvelteMap<string, number>();
|
||||||
|
|||||||
Reference in New Issue
Block a user