@muhkoo/connect 0.14.0-alpha.5 → 0.14.0-alpha.6

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.
@@ -3235,7 +3235,7 @@ function base64UrlDecode(s) {
3235
3235
  * expect (and isn't serving a stale cached bundle). Keep this in sync with
3236
3236
  * `package.json` `version`.
3237
3237
  */
3238
- const VERSION = "0.14.0-alpha.5";
3238
+ const VERSION = "0.14.0-alpha.6";
3239
3239
 
3240
3240
  /**
3241
3241
  * `HttpClient` — the one place the unified {@link Client} talks to the
@@ -7653,11 +7653,21 @@ class FileStorage {
7653
7653
  this.chunkSize = opts.chunkSize ?? 4 * 1024 * 1024;
7654
7654
  this.dataShards = opts.dataShards ?? 4;
7655
7655
  this.parityShards = opts.parityShards ?? 2;
7656
- // Shard reads coalesce into batches, so this is no longer a cap on
7657
- // requests — it is how many hashes are available to batch together. Too
7658
- // low and each batch is small and serial, which is strictly worse than
7659
- // not batching at all.
7660
- this.concurrency = Math.max(1, opts.concurrency ?? 16);
7656
+ // Shard reads coalesce into batches, so this is not a cap on requests —
7657
+ // it is how many hashes are available to batch together.
7658
+ //
7659
+ // 8, not 16, and that is measured rather than reasoned. Raising it to 16
7660
+ // (with the walk at 24) made a 519-file project load SLOWER: median 18.4s
7661
+ // against 14.9s over three runs each. More hashes pending fills batches
7662
+ // closer to the 256 cap, and a bigger batch is one large payload that has
7663
+ // to arrive and decode completely before ANY of its files resolve — so
7664
+ // the extra concurrency buys chunkier round trips with less overlap
7665
+ // rather than more parallelism.
7666
+ //
7667
+ // There is a floor as well as a ceiling: too low and each batch is small
7668
+ // and serial, which is worse than not batching at all. 8 sits between the
7669
+ // two, and moving it in either direction should be measured, not argued.
7670
+ this.concurrency = Math.max(1, opts.concurrency ?? 8);
7661
7671
  this.rsWasmModule = opts.rsWasmModule;
7662
7672
  if (this.chunkSize < 1)
7663
7673
  throw new Error("FileStorage: chunkSize must be >= 1 byte");
@@ -12152,10 +12162,12 @@ const MAX_DEPTH = 64;
12152
12162
  * project does not open a request per directory. Browsers cap concurrency per
12153
12163
  * origin anyway, so a larger number mostly moves the queue.
12154
12164
  */
12155
- /** Directory records fetched in parallel while walking. Raised alongside the
12156
- * shard read concurrency: the walk is what discovers the files whose shards
12157
- * then batch together, so a narrow walk throttles everything downstream. */
12158
- const WALK_CONCURRENCY = 24;
12165
+ /** Directory records fetched in parallel while walking.
12166
+ *
12167
+ * Back to 8 with the shard read concurrency: raising both together measured
12168
+ * SLOWER on a 519-file project (median 18.4s against 14.9s), because fuller
12169
+ * batches are chunkier round trips rather than more parallelism. */
12170
+ const WALK_CONCURRENCY = 8;
12159
12171
  /**
12160
12172
  * `Promise.all` with a ceiling, preserving input order.
12161
12173
  *