@torrent-tv/proxy 2.95.6 → 2.95.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/package.json
CHANGED
|
@@ -665,14 +665,17 @@ export class SharedPieceStore {
|
|
|
665
665
|
* range to declare.
|
|
666
666
|
*/
|
|
667
667
|
get wantedBytes() {
|
|
668
|
-
//
|
|
669
|
-
//
|
|
670
|
-
|
|
668
|
+
// MEMORY HOLDS WHAT IS READ; WHAT IS DOWNLOADED AHEAD HAS THE DISK. Download
|
|
669
|
+
// preferences order eviction and nothing else. Counted here, the map of a
|
|
670
|
+
// whole film asked for the whole film, the adaptive budget handed over all
|
|
671
|
+
// the memory the machine had free, and once the swarm was told the whole
|
|
672
|
+
// band the store filled 4.4 GB in five minutes and the kernel killed the
|
|
673
|
+
// process (Home Assistant, 2026-10-07, torrent-tv/meta#95).
|
|
671
674
|
const required = this.#lru.demand({ memoryRequiredOnly: true });
|
|
672
675
|
const pinned = this.#lru.pinnedCount;
|
|
673
|
-
if (
|
|
676
|
+
if (required.readers > 0) {
|
|
674
677
|
this.#widestSeenPieces = Math.max(this.#widestSeenPieces, required.widestPieces);
|
|
675
|
-
const pieces = Math.max(MIN_RESIDENT_PIECES,
|
|
678
|
+
const pieces = Math.max(MIN_RESIDENT_PIECES, required.unionPieces, required.widestPieces, pinned);
|
|
676
679
|
// Plus room to absorb what arrives while a write is finishing. Asking for
|
|
677
680
|
// exactly what the readers want leaves no free place ever, so every
|
|
678
681
|
// arrival evicts one of them — measured 2026-09-02: `6 reader(s) want 23
|