@glash/cli 0.2.37 → 0.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/deploy.mjs +7 -5
- package/package.json +1 -1
package/commands/deploy.mjs
CHANGED
|
@@ -711,12 +711,14 @@ function sourceUploadPartSize(value) {
|
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
function sourceUploadConcurrency(flags = {}) {
|
|
714
|
-
// Default
|
|
715
|
-
//
|
|
716
|
-
//
|
|
717
|
-
|
|
714
|
+
// Default 4 — parts upload simultaneously and 4 is the measured throughput
|
|
715
|
+
// sweet spot: a single connection can't saturate a typical uplink (~2.5x
|
|
716
|
+
// speedup from parallelism), but past ~4 connections contention makes it
|
|
717
|
+
// slower and unreliable. Override with --source-concurrency or
|
|
718
|
+
// GLASH_SOURCE_UPLOAD_CONCURRENCY (capped at 8).
|
|
719
|
+
const raw = flags['source-concurrency'] ?? process.env.GLASH_SOURCE_UPLOAD_CONCURRENCY ?? '4';
|
|
718
720
|
const parsed = Number(raw);
|
|
719
|
-
if (!Number.isFinite(parsed) || parsed < 1) return
|
|
721
|
+
if (!Number.isFinite(parsed) || parsed < 1) return 4;
|
|
720
722
|
return Math.max(1, Math.min(8, Math.floor(parsed)));
|
|
721
723
|
}
|
|
722
724
|
|
package/package.json
CHANGED