From e277d7000618e850213e5788ed9892a8427ff2b7 Mon Sep 17 00:00:00 2001 From: apt-get Date: Sat, 5 Sep 2026 03:30:21 +0200 Subject: [PATCH] double chunk size --- src/lib/streamCache.svelte.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/streamCache.svelte.ts b/src/lib/streamCache.svelte.ts index d9be581..00d5e74 100644 --- a/src/lib/streamCache.svelte.ts +++ b/src/lib/streamCache.svelte.ts @@ -8,14 +8,14 @@ const PARTIALS_KEY = 'partialStreams'; const PARTS_DIR = 'parts'; // 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 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 -const CHUNK_TIMEOUT = 60_000; +const CHUNK_TIMEOUT = 120_000; export const cached = new SvelteSet(readStored(STORAGE_KEY, [])); export const downloading = new SvelteMap();