Changes chunk size
Deploy / deploy (push) Successful in 2m34s

This commit is contained in:
twotalesanimation
2026-07-16 19:37:49 +02:00
parent 87332cdae3
commit 22f952488e
+7 -9
View File
@@ -9,16 +9,14 @@ import path from "path";
// Target workload: 220 s H.264 MP4 clips at 3050 Mbps = ~7125 MB per file, // Target workload: 220 s H.264 MP4 clips at 3050 Mbps = ~7125 MB per file,
// 13 concurrent reviewers on a LAN/office network. // 13 concurrent reviewers on a LAN/office network.
// //
// At 8 MB each chunk: // At 2 MB each chunk:
// • A 7 MB clip (2 s @ 30 Mbps) arrives in a single request. // • A 7 MB clip (2 s @ 30 Mbps) arrives in ~4 requests.
// • A 75 MB clip (20 s @ 30 Mbps) needs ~10 requests total. // • A 75 MB clip (20 s @ 30 Mbps) needs ~38 requests total.
// • A 125 MB clip (20 s @ 50 Mbps) needs ~16 requests total. // • A 125 MB clip (20 s @ 50 Mbps) needs ~63 requests total.
// //
// The previous 2 MB cap produced 4× as many HTTP round-trips and 4× as many // Keeps time-to-first-frame low: the player can start after the first
// file-open/stat operations for the same content, with no benefit for this // 2 MB chunk rather than waiting for a full 8 MB download.
// workload. Larger values (16 MB+) offer diminishing returns and increase const CHUNK_SIZE = 2 * 1024 * 1024; // 2 MB
// per-request heap pressure.
const CHUNK_SIZE = 8 * 1024 * 1024; // 8 MB
// READ_HIGH_WATER_MARK — libuv/Node.js internal read-buffer size per stream. // READ_HIGH_WATER_MARK — libuv/Node.js internal read-buffer size per stream.
// //