@muhkoo/connect 0.14.0-alpha.4 → 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.4";
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,6 +7653,20 @@ 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 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.
7656
7670
  this.concurrency = Math.max(1, opts.concurrency ?? 8);
7657
7671
  this.rsWasmModule = opts.rsWasmModule;
7658
7672
  if (this.chunkSize < 1)
@@ -12148,6 +12162,11 @@ const MAX_DEPTH = 64;
12148
12162
  * project does not open a request per directory. Browsers cap concurrency per
12149
12163
  * origin anyway, so a larger number mostly moves the queue.
12150
12164
  */
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. */
12151
12170
  const WALK_CONCURRENCY = 8;
12152
12171
  /**
12153
12172
  * `Promise.all` with a ceiling, preserving input order.