@muhkoo/connect 0.14.0-alpha.5 → 0.14.0-alpha.7
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/README.md +143 -23
- package/dist/browser/index.js +26 -10
- package/dist/browser/index.js.map +1 -1
- package/dist/server/index.js +26 -10
- package/dist/server/index.js.map +1 -1
- package/package.json +3 -2
package/dist/server/index.js
CHANGED
|
@@ -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.
|
|
3238
|
+
const VERSION = "0.14.0-alpha.7";
|
|
3239
3239
|
|
|
3240
3240
|
/**
|
|
3241
3241
|
* `HttpClient` — the one place the unified {@link Client} talks to the
|
|
@@ -7653,11 +7653,24 @@ 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
|
|
7657
|
-
//
|
|
7658
|
-
//
|
|
7659
|
-
//
|
|
7660
|
-
|
|
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 because nothing measurable argues for more.
|
|
7660
|
+
//
|
|
7661
|
+
// Raising it to 16 (walk at 24) looked 23% slower over three runs each,
|
|
7662
|
+
// and reverting looked like it restored the win — until a third set of
|
|
7663
|
+
// three landed on the same numbers as the RAISED setting. Pooled, the
|
|
7664
|
+
// configurations are indistinguishable: the run-to-run spread on a
|
|
7665
|
+
// 519-file project is 13.9-20.9s, far wider than any difference between
|
|
7666
|
+
// them. Three samples could not have resolved it and should not have
|
|
7667
|
+
// been trusted to.
|
|
7668
|
+
//
|
|
7669
|
+
// What IS established is the floor: too low and each batch is small and
|
|
7670
|
+
// serial, which is worse than not batching at all. Above that the setting
|
|
7671
|
+
// stops mattering at this scale, so it stays at the simpler value. Moving
|
|
7672
|
+
// it needs a sample large enough to see past that spread.
|
|
7673
|
+
this.concurrency = Math.max(1, opts.concurrency ?? 8);
|
|
7661
7674
|
this.rsWasmModule = opts.rsWasmModule;
|
|
7662
7675
|
if (this.chunkSize < 1)
|
|
7663
7676
|
throw new Error("FileStorage: chunkSize must be >= 1 byte");
|
|
@@ -12152,10 +12165,13 @@ const MAX_DEPTH = 64;
|
|
|
12152
12165
|
* project does not open a request per directory. Browsers cap concurrency per
|
|
12153
12166
|
* origin anyway, so a larger number mostly moves the queue.
|
|
12154
12167
|
*/
|
|
12155
|
-
/** Directory records fetched in parallel while walking.
|
|
12156
|
-
*
|
|
12157
|
-
*
|
|
12158
|
-
|
|
12168
|
+
/** Directory records fetched in parallel while walking.
|
|
12169
|
+
*
|
|
12170
|
+
* Kept at 8 alongside the shard read concurrency. Raising both to 24/16 was
|
|
12171
|
+
* neither better nor worse once enough samples were taken — the spread between
|
|
12172
|
+
* runs is wider than the difference between the settings — so this stays at the
|
|
12173
|
+
* simpler value. See FileStorage's note. */
|
|
12174
|
+
const WALK_CONCURRENCY = 8;
|
|
12159
12175
|
/**
|
|
12160
12176
|
* `Promise.all` with a ceiling, preserving input order.
|
|
12161
12177
|
*
|